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 open a url with lua by use variable?

 
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: 69

PostPosted: Mon May 18, 2020 2:50 am    Post subject: how to open a url with lua by use variable? Reply with quote

wiki1=control_getCaption(CETrainer.CEEdit2)

wiki2="https://terraria-zh.gamepedia.com/"

wiki3=table.concat({wiki2,wiki1})

os.execute("start wiki3")

=================================

it can not work

os.execute("start xxxxx") just only open a url we typed completed

but cannot open url with a variable
Back to top
View user's profile Send private message
exohaxor
Expert Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 101

PostPosted: Mon May 18, 2020 4:44 am    Post subject: Reply with quote

Code:

wiki1 = control_getCaption(CETrainer.CEEdit2)

wiki2 = "https://terraria-zh.gamepedia.com/"

wiki3 = table.concat({wiki2, wiki1})

os.execute("start "..wiki3)

or just do this
Code:

wiki1 = control_getCaption(CETrainer.CEEdit2)

wiki2 = "https://terraria-zh.gamepedia.com/"

os.execute("start "..wiki2..wiki1)


also recommended to localize your variables like local wiki1

_________________
hi
Back to top
View user's profile Send private message
Corroder
Grandmaster Cheater Supreme
Reputation: 75

Joined: 10 Apr 2015
Posts: 1668

PostPosted: Mon May 18, 2020 6:38 am    Post subject: Reply with quote

Just make it simple:

Code:
-- wiki1 = CETrainer.CEEdit2.Text
wiki1 = 'Talk:Terraria_Wiki'  -- assump this is as CETrainer.CEEdit2.Text
wiki2 = "https://terraria-zh.gamepedia.com/"
wiki3 = wiki2..wiki1
shellExecute(wiki3)


or

Code:
shellExecute(wiki2..wiki1)

_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
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