Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Dears,
Can anyone help to understand how to call a external applications using OS script (mapkey)?
For example if I want to open https://community.ptc.com/ using a OS Script (mapkey) how can I do this.
Does it require VBA coding?
Regards,
Sreenivas
Solved! Go to Solution.
OS Skript (inside Mapkey Editor):
start "" "http://www.inneo.de"
is saved as :
@SYSTEM start http://www.inneo.com;
inside the config.pro.
Br,
Eike
Hello Eike,
Thank you very much for your response.
I just simply copy pasted
@SYSTEM start http://www.inneo.com;
in the OS script. But its not working. Am I missing something here
Regards,
Sreenivas
OS Skript (inside Mapkey Editor):
start "" "http://www.inneo.de"
is saved as :
@SYSTEM start http://www.inneo.com;
inside the config.pro.
Br,
Eike
Thank you very much Eike. Its working !!!!!!
@sreenivaspai wrote:
Hello Eike,
Thank you very much for your response.
I just simply copy pasted
@SYSTEM start http://www.inneo.com;
in the OS script. But its not working. Am I missing something here
Regards,
Sreenivas
Hi,
please tell us what external application do you want to launch. How do you launch external application, now ?
Below you can see an example ... mapkey dd start application named open_drawing_cr2.exe
mapkey dd @SYSTEMstart D:\\PTC\\Open_Model_Drawing_AutoIt\\open_drawing_cr2.exe;
No, this doesn't go in the config.pro, it simply gets included inside a mapkey:
mapkey lws @MAPKEY_NAMELaunch Website; @MAPKEY_LABELLaunch Website;\
mapkey(continued) @SYSTEM start http://www.inneo.com;
I use it to open my working directory and open external programs also.
here is one example:
@echo off
set cdn=%cd%
set cust=%cdn:~10,3%
set trcn=%cdn:~13,9%
if exist "\\your server\Customers\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\Customers\%cust%\_Final Docs\%trcn% docs"
)
if exist "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs"
)
@Osiel_G wrote:
I use it to open my working directory and open external programs also.
here is one example:
@echo off
set cdn=%cd%
set cust=%cdn:~10,3%
set trcn=%cdn:~13,9%
if exist "\\your server\Customers\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\Customers\%cust%\_Final Docs\%trcn% docs"
)
if exist "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs"
)
Hi,
my suggestion ...
1.] create batch file, eg. myapp.bat and put following commands into it
@echo off
set cdn=%cd%
set cust=%cdn:~10,3%
set trcn=%cdn:~13,9%
if exist "\\your server\Customers\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\Customers\%cust%\_Final Docs\%trcn% docs"
)
if exist "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs" (
start "" "\\your server\CUI\ITAR\%cust%\_Final Docs\%trcn% docs"
)
2.] during mapkey creation put following info into OS Script tab area
start "window title" /D working_directory_path path_to_batch_file
Note: The above mentioned start command is just my guess, only.