View previous topic :: View next topic |
Author |
Message |
Ludwig Advanced Cheater
Reputation: 0
Joined: 10 Jan 2016 Posts: 68
|
Posted: Thu Mar 17, 2016 2:22 pm Post subject: Lua and VBS script interaction |
|
|
hi guys
concerning the following...
MyPath = TrainerOrigin
--MyPath = "c:\\"
settingsFile = io.open(MyPath.."bp_subscr.ini", "r");
os.execute("wscript " ..MyPath.."Firefox.vbs")
TrainerOrigin works fine for reading data from a file...<"bp_subscr.ini">
but when i try to use TrainerOrigin as part of my path for where the .vbs script is located, it gives me an error that it cant find it at the path...though when i copy my vbs file to c:/ and run it through os.execute("wscript c:/Firefox.vbs") it executes corectly...any idea why?
|
|
Back to top |
|
 |
Ludwig Advanced Cheater
Reputation: 0
Joined: 10 Jan 2016 Posts: 68
|
Posted: Sun Mar 20, 2016 6:14 am Post subject: |
|
|
the popup i get with using trainerorigin for the vbs script is "There is no file extension in "C:\.....<the correct path wher the .vbs files and trainer is being kept>...though what baffles me, is im using the same trainer origin in the same script to read other files...AND...the moment i move my files to c:\...and put myPath as "C:\\"...it works fine...
any idea as to where my fault is, or how i can fix it?...as its a bit anoying to work with to different paths and install files to mainroot dir...
|
|
Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 958
|
Posted: Sun Mar 20, 2016 6:41 am Post subject: |
|
|
Only some suggestions.
Have you check if the path has space or unicode character? They may need to be quote in command line,eg:
Code: |
local cmd = 'wscript "' ..MyPath..'Firefox.vbs"'
os.execute(cmd) |
Try print cmd and see what it is, and may paste in a command prompt to see if it work.
Also, the execution of wscript may need some command prompt environment variable setup.
Try Code: | local p = io.popen('set')
local ret = p:read('*a')
p:close()
print(ret) |
to see if the environment is right,eg. user and system environment may be different.
btw, the TrainerOrigin only exist as a path if the ce is started by clicking '*.ct' '*.cetrainer' or '*.exe(ce save trainer as exe)' from windows explorer (or command prompt), and it won't change if loading another *.ct etc. into ce (by menu file/load or open cheat table icon button ) from another directory.
_________________
- Retarded. |
|
Back to top |
|
 |
Ludwig Advanced Cheater
Reputation: 0
Joined: 10 Jan 2016 Posts: 68
|
Posted: Sun Mar 20, 2016 7:16 am Post subject: |
|
|
panraven wrote: | Only some suggestions.
Have you check if the path has space or unicode character? They may need to be quote in command line,eg:
Code: |
local cmd = 'wscript "' ..MyPath..'Firefox.vbs"'
os.execute(cmd) |
|
thnx...that did the trick...
|
|
Back to top |
|
 |
|