cbueno
asked on
Sending variables using shell from one .exe to another .exe . Easy for most people
Hello to all
I got the following code:
Dim MyVars as string
MyVars="Yes"
Shell "c:\winnt\ScrSaver.exe MyVars"
Now i am looking how to send the same variable (MyVars) where MyVars="NO" and WITHOUT the ScrSaver.exe been executed again!! Source Code would be usefull if you can.
Anyone any ideas????
Carlos Bueno
carlosbueno2000@yahoo.com
I got the following code:
Dim MyVars as string
MyVars="Yes"
Shell "c:\winnt\ScrSaver.exe MyVars"
Now i am looking how to send the same variable (MyVars) where MyVars="NO" and WITHOUT the ScrSaver.exe been executed again!! Source Code would be usefull if you can.
Anyone any ideas????
Carlos Bueno
carlosbueno2000@yahoo.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi AW
Why do you suggest me to do it this:
Shell "c:\winnt\ScrSaver.exe " & MyVars
rather than this:
Shell "c:\winnt\ScrSaver.exe MyVars"
Whats the difference???
Carlos Bueno
Why do you suggest me to do it this:
Shell "c:\winnt\ScrSaver.exe " & MyVars
rather than this:
Shell "c:\winnt\ScrSaver.exe MyVars"
Whats the difference???
Carlos Bueno
This will pass the value of MyVars to the exe:
Shell "c:\winnt\ScrSaver.exe " & MyVars
where this will pass the Text "MyVars" to the exe instead of the value:
Shell "c:\winnt\ScrSaver.exe MyVars"
Shell "c:\winnt\ScrSaver.exe " & MyVars
where this will pass the Text "MyVars" to the exe instead of the value:
Shell "c:\winnt\ScrSaver.exe MyVars"
The difference is between direct assignment and in-direct referencing.
1. Shell "c:\winnt\ScrSaver.exe MyVars" is direct assignment. The command processor sees "c:\winnt\ScrSaver.exe MyVars" directly from Shell.
2. Shell "c:\winnt\ScrSaver.exe " & MyVars is in-direct referencing. When MyVars = "Yes", the command processor sees "c:\winnt\ScrSaver.exe Yes" as referenced from Shell.
Regards, P1
1. Shell "c:\winnt\ScrSaver.exe MyVars" is direct assignment. The command processor sees "c:\winnt\ScrSaver.exe MyVars" directly from Shell.
2. Shell "c:\winnt\ScrSaver.exe " & MyVars is in-direct referencing. When MyVars = "Yes", the command processor sees "c:\winnt\ScrSaver.exe Yes" as referenced from Shell.
Regards, P1
Shell "c:\winnt\ScrSaver.exe MyVars"
NO!!!!!
try...
shell "path and filename and extention sa string", & myvars
NO!!!!!
try...
shell "path and filename and extention sa string", & myvars
Regards, P1