fahad Posted February 19, 2007 Share Posted February 19, 2007 (edited) The execute() function does not execute some functions. Is there a way to change this? Thanks PS: Yay! My first post! Edited February 19, 2007 by fahad Link to comment Share on other sites More sharing options...
Somerset Posted February 19, 2007 Share Posted February 19, 2007 The execute() function does not execute some functions. Is there a way to change this?ThanksPS: Yay! My first post!how about posting a little more information? what do you want done? or possible code? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 19, 2007 Moderators Share Posted February 19, 2007 The execute() function does not execute some functions. Is there a way to change this?ThanksPS: Yay! My first post!Are any of the functions not being executed one of the below (or fall under the criteria listed)?Environment, Files, Dir, Disk, GUI, InputBox, MsgBox, Misc, Network, Obj/COM, Process, Registry, Tray, WinKill functions implying deletion or modification will not be executed. They will set @error to 9999 and return "". Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
fahad Posted February 19, 2007 Author Share Posted February 19, 2007 Yup, those are the ones I was talking about. I saw about it in the helpfile before posting here. So, can I get past this? Link to comment Share on other sites More sharing options...
Shevilie Posted February 19, 2007 Share Posted February 19, 2007 Well we'll need some code to debug and look into Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
jvanegmond Posted February 19, 2007 Share Posted February 19, 2007 Yup, those are the ones I was talking about. I saw about it in the helpfile before posting here. So, can I get past this? Well, execute is not going to help you further here. You can write your own function to parse incoming commands, and then use something like this: $sParam = StringSplit($sCommand,"(,)",0) Switch $sParam[0] Case "MsgBox" MsgBox($sParam[1], $sParam[2], $sParam[3]) ; etcetera etcetera EndSwitch github.com/jvanegmond Link to comment Share on other sites More sharing options...
fahad Posted February 20, 2007 Author Share Posted February 20, 2007 How would I go about doing that? And what does that script you just showed me do? Link to comment Share on other sites More sharing options...
Shevilie Posted February 20, 2007 Share Posted February 20, 2007 (edited) fahad can we at least have some code, so we know in which way we can help you Edited February 20, 2007 by Shevilie Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
jvanegmond Posted February 20, 2007 Share Posted February 20, 2007 How would I go about doing that? And what does that script you just showed me do?I have written a more excessive example, try to learn from this. _execute('MsgBox(0x30,"Warning","Disappears in 5 seconds..", 5)') _execute('MsgBox(0x40,"Information","Does not disappear.")') Func _execute($sCommand) $sCommand = StringReplace($sCommand,'"', "") $sParam = StringSplit($sCommand,"(,)",0) Switch $sParam[1] Case "MsgBox" Switch $sParam[0] Case 6 MsgBox($sParam[2], $sParam[3], $sParam[4],$sParam[5]) Case 5 MsgBox($sParam[2], $sParam[3], $sParam[4]) EndSwitch ; etcetera etcetera EndSwitch EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 20, 2007 Moderators Share Posted February 20, 2007 I have written a more excessive example, try to learn from this. _execute('MsgBox(0x30,"Warning","Disappears in 5 seconds..", 5)') _execute('MsgBox(0x40,"Information","Does not disappear.")') Func _execute($sCommand) $sCommand = StringReplace($sCommand,'"', "") $sParam = StringSplit($sCommand,"(,)",0) Switch $sParam[1] Case "MsgBox" Switch $sParam[0] Case 6 MsgBox($sParam[2], $sParam[3], $sParam[4],$sParam[5]) Case 5 MsgBox($sParam[2], $sParam[3], $sParam[4]) EndSwitch ; etcetera etcetera EndSwitch EndFuncoÝ÷ Ûú®¢×q©÷öÚÞjYr±ç¾&êÞjÊ'~Þ½éî²)ಶ§X¤zØ^iº/x]¡ë'¢ØbajÖ°®+b§¢¹g¬±¨n]¡ëË â¶)ඡרºÙæ¥*-êí©é®âv)àÞr^¶r¥v-z{bjYr«ÞÞzºè®ÈhÁëÞ®'ò¢æ«zÚòx-¢ë¶jƧ{¦¦W¨»º{.㧶¥ªíË¥jºbyǨ}Êz'È èçmçÚrÒ,yéèé^½©ÜzÚ"´¥²zz+y«(ú+¶¶¸§©§¶Ê·ö÷©§v)í¢+H*.j··w*Z²È§«-®)ৢØî²Ù^j÷¨ºÛayÚ.nWªº^±©e¶¶«jëh×6_execute('MsgBox(0x30,Warning,Disappears in 5 seconds.., 5)') _execute('MsgBox(0x40,Information,Does not disappear.)') Func _execute($sCommand) $sParam = StringSplit($sCommand,"(,)",0) Switch $sParam[1] Case "MsgBox" Switch $sParam[0] Case 6 Return MsgBox($sParam[2], $sParam[3], $sParam[4],$sParam[5]) Case 5 Return MsgBox($sParam[2], $sParam[3], $sParam[4]) EndSwitch ; etcetera etcetera EndSwitch Return Seterror(1, 0, '') EndFunc Also, from what I remember of what I used of Execute, you should actually be returning the value of the message box for a full example. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
fahad Posted February 20, 2007 Author Share Posted February 20, 2007 KK. A way to do this without coding in every single function? And would this work for variables, Im trying to write a script that executes code stored in a variable, which was sent by a UDPSend function. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 20, 2007 Moderators Share Posted February 20, 2007 KK. A way to do this without coding in every single function? And would this work for variables, Im trying to write a script that executes code stored in a variable, which was sent by a UDPSend function.If that's the case, then look at AutoIt3ExecuteScript or AutoIt3ExecuteLine, for examples on how to use them (if you don't understand the help file) search the forum, there are many... (I believe I have seen AutoIt Smith use an example of it in his TCPServer/Client that may be exactly what you are looking for). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
fahad Posted February 20, 2007 Author Share Posted February 20, 2007 (edited) The computer receiving code to execute does not have autoit installed, nor do I wish to install autoit on it. I just want to receive code by UDPRecv, and execute it. As autoit3executescript requires autoit to be installed, not an option. Edited February 20, 2007 by fahad Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 20, 2007 Moderators Share Posted February 20, 2007 The computer receiving code to execute does not have autoit installed, nor do I wish to install autoit on it.I just want to receive code by UDPRecv, and execute it. As autoit3executescript requires autoit to be installed, not an option.You obviously didn't read it or find examples on the forum. Are you going to have your executable on the end-users PC for the UDP connection, or is the connection going to be magic? If you're autoit exe is on the end-users pc, that's all you need. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
fahad Posted February 21, 2007 Author Share Posted February 21, 2007 Kk. Anyone wants to see this program, its on prank.org, computer pranks forum as soon as its finished Link to comment Share on other sites More sharing options...
fahad Posted February 21, 2007 Author Share Posted February 21, 2007 Kk. Anyone wants to see this program, its on prank.org, computer pranks forum as soon as its finishedSorry, I cant edit. Let me get this straight:I fileinstall autoit3.exe into my script. I extract to a faraway folder in the running. As soon as the script is received, that is sent by filewrite() express delivery to the place where autoit is. I then use autoit3executescript. Right? Link to comment Share on other sites More sharing options...
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