Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run command with parameters

Status
Not open for further replies.

hkgupta

Programmer
Jun 21, 2006
4
US
Hi,

I am not a CASL programmer, but I wrote a CASL MACRO about three years ago to work under Attachmate Accessory Manager (Version 4.1…). I am back to same client site after three years and they have upgraded some of their PC’s to Attachmate version 7.5….. The old MACRO does not work on new version. I have isolated the problem down to parameter passing on the run command.

Following works on both 4.1 and 7.5 versions. (I tried it with a single line CASL MACRO)

run ‘notepad’ ; it launches Notepad correctly

However if I try to pass a parameter, it works only on version 4.1

run ‘notepad mytxtfile’

Version 7.5 return error 19 – 2

I will appreciate any help in this matter.
 
Run "C:\Windows\Notepad.exe c:\yourpath\yourfile.ext"

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Thanks MrMilson,

It still comes up with the error mentioned earlier (19 - 2). On version 7.5 it is not able to start notepad at all if any parameter is given. Our copy is InfoConnect Enterprise 7.5 and OS is Windows 2000 Professional.

Version 4.1 launches Notepad even if I provide incorrect file name. error is returned by notepad in that situation.

I suspect some kind of settings in infoconnect if you are able to run it on your machine. However I have no idea where to look for these settings.


 
19 - 2 is specified file can't be found post your line and i'll see if I can help more.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
MrMilson,

You are right about the error. Exact error is

Error Number: 19 - 2
The specified file can not be found

However the notepad is not launched at all.

Exact code typed in MACRO is

run "C:\Windows\Notepad.exe c:\sat_dt.txt"

Thanks
 
C:\Windows\Notepad.exe <-you have notepad at this location?

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Run("notepad c:\test.txt") ????

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
MrMilson,

My mistake on C:/Windows/notepad, I was trying various combination (most of them without path) and sent you the last one. However the problem remains

I tried

run 'notepad' and
run("notepad")

both launch note pad correctly

if I try

run 'notepad c:\abc.txt' or
run ("notepad c:abc.txt")

I get the same error 19 - 2 in both cases

Note: couple of times it crashed Infoconnect but I am not able to repeat it and it happened after more than 20 tries. I have never seen infoconnect crashing before and may be unrelated to specific problem we are dealing with.

Thanks,
 
might try a re-boot

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
This syntax works for me:

From a CMD prompt:

C:\> "notepad" c:\abc.txt

From within an application:

'"notepad" c:\abc.txt'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top