Overlord Posted July 1, 2006 Posted July 1, 2006 ok, this should be plain dead simple but I simply can't see the solution. mpstart1() if $type="closed" then closed1() ;; click for multiplayer startup Func mpstart1() MouseMove(500,350) MouseDown("left") MouseUp("left") Sleep(1000) EndFunc ;;click for closed internet func closed1() MouseMove(500,345) MouseDown("left") MouseUp("left") Sleep(1000) Send($password) EndFunc ;;click for open internet func open1() MouseMove(500,380) MouseDown("left") MouseUp("left") Sleep(1000) Send($password) EndFunc if you look on the second code line it says that if the returnvalue from the ini is closed then run function closed. How can I tell it that it needs to run function closed when the word is closed and when the word is open to run the function open?
Developers Jos Posted July 1, 2006 Developers Posted July 1, 2006 if $type="closed" then closed1() if $type="open" then open1() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted July 1, 2006 Developers Posted July 1, 2006 it can't be posted in 1 line?thx!Why would it need to be 1 line ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
herewasplato Posted July 1, 2006 Posted July 1, 2006 it can't be posted in 1 line? thx!yes, it can be posted in 1 line :-)if $type="open" then open1()oÝ÷ Øò¢æ«zZ()à¶ì¨º·(uë&jY^®·¹Ç+-¢Þ)Þjëh×6MouseMove(500,350) MouseDown("left") MouseUp("left")using MouseClick [size="1"][font="Arial"].[u].[/u][/font][/size]
PsaltyDS Posted July 1, 2006 Posted July 1, 2006 ok, this should be plain dead simple but I simply can't see the solution. mpstart1() if $type="closed" then closed1() ;; click for multiplayer startup Func mpstart1() MouseMove(500,350) MouseDown("left") MouseUp("left") Sleep(1000) EndFunc ;;click for closed internet func closed1() MouseMove(500,345) MouseDown("left") MouseUp("left") Sleep(1000) Send($password) EndFunc ;;click for open internet func open1() MouseMove(500,380) MouseDown("left") MouseUp("left") Sleep(1000) Send($password) EndFuncoÝ÷ Ú'ò¢éh¢J'¶¬yÊ'uÊzX§z+lk+-«b~Ø^ën®{Úç®è§+vØ^»§~éܶ*'rZ,yÑèÁƧ"×¥+m«b¶wvËh®éߺw-Üw^Ø^ÂÝÇ%¢Çjwpéíì(ج¢§¶îØ^~éܶ*'¢§þ«¨µå¡jÛ¶Í7êÜ©x-êÞjr'vß±ÊÞzr-r¥vZ(X¤zØb±«¢+ÙµÁÍÑÉÐÄ ¤)MÝ¥Ñ %¹¥I ÅÕ½ÐíèÀäÈí5å¥ÈÀäÈí5奱¹¥¹¤ÅÕ½Ðì°ÅÕ½Ðí5åMÑ¥½¸ÅÕ½Ðì°ÅÕ½ÐíQåÁÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(% ÍÅÕ½Ðí=Á¸ÅÕ½Ðì($%=Á¸Ä ¤(% ÍÅÕ½Ðí ±½ÍÅÕ½Ðì($% ±½ÍÄ ¤(% ͱÍ($%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÌÌìÅÕ½Ðì°ÅÕ½Ðí ͹½Ð¡¹±è%¹Ù±¥QåÁÌÌìÅÕ½Ðì¤)¹MÝ¥Ñ ( Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Valuater Posted July 1, 2006 Posted July 1, 2006 if then else otherwise I like that... can we add OtherWise pretty please???? lol 8)
herewasplato Posted July 1, 2006 Posted July 1, 2006 @Overlord, u welcome @Valuater, u funny @JdeB, u patient @PsaltyDS, u code goodly [size="1"][font="Arial"].[u].[/u][/font][/size]
Overlord Posted July 1, 2006 Author Posted July 1, 2006 (edited) there's indeed a ini file where needs to be selected wheter it will be open or closed... the only problem I'm still having is the game starting. It starts and quits directly. aint normal. but I think that has something to do with the game. ans the reason I wanted it to be 1 line was to make my code smaller...but that has been solved also by plato. Edited July 1, 2006 by Overlord
herewasplato Posted July 1, 2006 Posted July 1, 2006 (edited) ...ans the reason I wanted it to be 1 line was to make my code smaller...but that has been solved also by plato.no UDFs needed - if I understand the code snippet correctly;; click for multiplayer startup MouseClick("left", 500, 350, 1, 0) Sleep(1000) ;; click for closed internet If $type = "closed" Then MouseClick("left", 500, 345, 1, 0) ;; click for open internet If $type = "open" Then MouseClick("left", 500, 380, 1, 0) Sleep(1000) Send($password) Send("{ENTER}") Edited July 1, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
Developers Jos Posted July 1, 2006 Developers Posted July 1, 2006 ans the reason I wanted it to be 1 line was to make my code smaller...but that has been solved also by plato.Glad that Plato understood it and solved it ... Plato, could you explain to me what you specified that I didn't ? I got my brain offline today so can't think .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
herewasplato Posted July 1, 2006 Posted July 1, 2006 ...Plato, could you explain to me what you specified that I didn't ?...I was just being funny or stupid (depending on how you look at it). You posted Overlord's existing line of code as a reference of where to place your additional one line of code as a solution to the OP. Overlord asked if it could be posted [not coded] in one line. ...so, I re-posted your one line solution as one line of code... not two lines - stupid huh? ...but I guessed that the overall desire was for a shorter script - so I included the MouseClick suggestion so that my post would not be worthless. I think that is what Overlord was talking about when thanking me... but I'm still not positive of that. [size="1"][font="Arial"].[u].[/u][/font][/size]
Developers Jos Posted July 1, 2006 Developers Posted July 1, 2006 I was just being funny or stupid (depending on how you look at it). You posted Overlord's existing line of code as a reference of where to place your additional one line of code as a solution to the OP. Overlord asked if it could be posted [not coded] in one line. ...so, I re-posted your one line solution as one line of code... not two lines - stupid huh? ...but I guessed that the overall desire was for a shorter script - so I included the MouseClick suggestion so that my post would not be worthless. I think that is what Overlord was talking about when thanking me... but I'm still not positive of that. Didn't realy expect an answer ... but I now you did it anyways, I am glad to see it's not just me scratching my head ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
herewasplato Posted July 1, 2006 Posted July 1, 2006 (edited) Didn't realy expect an answer ...Your English is great, but since I was poking fun at a nuance - I thought it deserved a bit of detail in case others wondered why "posted" was in red.........later Edited July 1, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now