Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to write "os.execute" when the filepath have &

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 70

PostPosted: Tue Jun 04, 2019 6:24 pm    Post subject: how to write "os.execute" when the filepath have & Reply with quote

os.execute("start %HOMEPATH%\\appdata\\LocalLow\\Meta Interaction\\Dragon Cliff")

because "Meta Interaction" have a blank between "Meta" & "Interaction"
it work error
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Tue Jun 04, 2019 7:47 pm    Post subject: Reply with quote

Code:
os.execute([["start %HOMEPATH%\\appdata\\LocalLow\\Meta Interaction\\Dragon Cliff"]])


or

Code:
cmd = 'start "" "%HOMEPATH%\\appdata\\LocalLow\\Meta Interaction\\Dragon Clif" '
os.execute(cmd)

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Wed Jun 05, 2019 6:52 am    Post subject: Reply with quote

if that doesn't work escape the space just like you do the single backslash "\\Meta\ Interaction\\"
_________________
https://github.com/FreeER/ has a few CE related repos
Back to top
View user's profile Send private message
cancandodo
Advanced Cheater
Reputation: 0

Joined: 09 Mar 2012
Posts: 70

PostPosted: Tue Jun 11, 2019 6:44 pm    Post subject: Reply with quote

Corroder wrote:
Code:
os.execute([["start %HOMEPATH%\\appdata\\LocalLow\\Meta Interaction\\Dragon Cliff"]])


or

Code:
cmd = 'start "" "%HOMEPATH%\\appdata\\LocalLow\\Meta Interaction\\Dragon Clif" '
os.execute(cmd)


tks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites