cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to call a external applications using OS script (mapkey)?

sreenivaspai
4-Participant

How to call a external applications using OS script (mapkey)?

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8

Hi ...

 

you can use following Mapkey

 

e.g.

 

@SYSTEM start http://www.inneo.com;

 

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;

 

 


Martin Hanák
TomU
23-Emerald IV
(To:sreenivaspai)

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.


Martin Hanák
Top Tags