neogia
Active Members-
Posts
269 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
neogia's Achievements
Universalist (6/7)
1
Reputation
-
iamkoshr reacted to a post in a topic: Merge Variables
-
Released Version: 1.0.4 7/19/06 (1.0.4) - Fixed bug where using the substring "func" anywhere in a line of code caused it to be truncated. Now the only limitation is that the substrings "func" and "endfunc" cannot be found at the beginning of a line of code.
-
I'm working on a fix for this right now, but if you'll look at line 183 of Coroutine.au3, you'll see the problem lies in the naming of your variable "$RunFunction" and it's truncating the line because it finds the substring "func". If you rename the variable to something that doesn't include "func", it should be a fine workaround until I release the next version. (ex: $RunFnction) Thanks for your praise and for the very detailed bug submission. I'll have the fix out soon enough.
-
You can use $pid = Run("net view", "", 7) And parse the return using StdoutRead().
-
So, I've used GUICtrlCreatePic() to create a full-window background pic. But now my controls are covered, is there a way to control the "z-order" of controls so that some are in front of others?
-
New FormatCoCreate helper function released. Changes ---------- - Now, the code you convert with the FormatCoCreate function keeps most of its readability and looks much nicer (thanks Busti).
-
I've had some problems with the clipboard in the past, and this is what I've done: ClipPut("") Send("^c") $clip = ClipGet() While $cip == "" $clip = ClipGet() WEndI know it's longer, but it's usually that the contents just haven't been put into the clipboard by the time AutoIt gets to the next line, and tries to read it. Edit:Not at all. We all make typos
-
I was going to suggest AdlibEnable, but it looks as if he's wanting immediate recognition, or at least within one While Loop cycle.
-
Ironic, huh?
-
Well, you could in fact use line breaks, but AutoIt can't accept actual line breaks in a literal string, so your function would look even more bitchingly confusing if it looked like this: $main = _CoCreate('Func mainFunction()'&Chr(13)&'$test = "This is some text."'&Chr(13)&'HelperFunction()'&Chr(13)&'HelperFunction2()'&Chr(13)&'For $i = 1 to 20'&Chr(13)&' ; Do stuff'&Chr(13)&'Next'&Chr(13)&'EndFunc', Chr(13))
-
#include <Coroutine.au3> $_StartMuliThread = _CoCreate( 'Func Count($return)|'& _ '#NoTrayIcon|'& _ ' Return msgbox( 0, "BLUB"&$return , "number : " & $return )|'& _ 'EndFunc') Dim $MBoX[5],$_Run[5] For $i = 1 To 4 $MBoX[$i]= _CoStart($_StartMuliThread, '$_Run['&$i&']') Next Local $c_Count = 0 While 1 $c_Count += 1 If _CoStatus($MBoX[$c_Count]) == "returned" Then $MBoX[$c_Count]= _CoStart($_StartMuliThread, '$_Run['&$c_Count&']') WinWait("BLUB$_Run["&$c_Count&"]") WinMove( "BLUB$_Run["&$c_Count&"]" , "" , Random( 0 , @DesktopWidth-100 ) , Random( 0, @DesktopHeight-100) ) ;_CoKill($MBoX[$c_Count]) EndIf If $c_Count == 4 Then $c_Count = 0 WEnd oÝ÷ Ù.h§2Þq©eÁ«+zÛ«)àÓbrj{"µØm~)ݶ°whÁ*ë-i×^u¥¢f¢µ©ÝÜ(®Kwq©è¢¨"ëaȬ~Þvç¶*'jZn®,zÊâ[)ä[(§ÊjYB¡+Z®Ü"¶ýÓ~º}ýjjtߨýßÙz§)ݶ j»n¶)bÍ뽩ZÑ/jWmzö¥¹«^jºÚÉé^éí±*2¢çh¦É-+ºw-Ú+ro'hx,¢g)à)¶¬jëh×6 For $i = 1 To 4 $temp = $_Run[$i] $MBoX[$i]= _CoStart($_StartMuliThread, '$temp') Next Edit: BTW, your _CoCreate() function looks much cleaner when it is edited like that. I might change FormatCoCreate() to stylize the function like that, thanks for the involuntary contribution.
-
I've in fact taken your specific situation into account already. If I have a main body of code, you can include "helper" functions using _CoInclude(). What I would do is this. Say I have this as my script (very much shorter than 300 lines, mind you). $test = "This is some text." HelperFunction() HelperFunction2() For $i = 1 to 20 ; Do stuff Next Func HelperFunction() ; More stuff EndFunc Func HelperFunction2() ; Even More stuff ; Repetitive, I know EndFunc oÝ÷ ØÚ0{-y§h~;¬¶ë"¨ ·µì¨»e©l¢f¤y§[h 'r[y«,¡«¢+Ø(ÀÌØíµ¥¸ô} ½ ÉÑ ÌäíÕ¹µ¥¹Õ¹Ñ¥½¸ ¥ðÀÌØíÑÍÐôÅÕ½ÐíQ¡¥Ì¥ÌͽµÑáиÅÕ½Ðíñ!±ÁÉչѥ½¸ ¥ñ!±ÁÉչѥ½¸È ¥ñ½ÈÀÌØí¤ôÄѼÈÁðì¼ÍÑÕñ9áÑñ¹Õ¹Ìäì¤)} ½%¹±Õ ÀÌØíµ¥¸°ÌäíÕ¹!±ÁÉչѥ½¸ ¥ðì5½ÉÍÑÕñ¹Õ¹ñÕ¹!±ÁÉչѥ½¸È ¥ðìÙ¸5½ÉÍÑÕðìIÁѥѥٰ$¹½Ýñ¹Õ¹Ìäì¤(ÀÌØíÁ¥ô} ½MÑÉÐ ÀÌØíµ¥¸¤( Then yes, the "check" is placed at the beginning of the loop and only at the beginning. In my script, the while loop only serves to create an infinite loop. I placed my own "check" inside the loop. In that case, PixelGetColor(...) is only checked at the If statement, and only at the If statement, once every loop. In its current implementation, you'll get about 95-99 PixelGetColor(...) checks per second, which should be rather accurate to put an immediate stop to your child script. Hope that wasn't overload.
-
Actually, with my UDF, there's no need to fileinstall anything, it handles everything dynamically. All you must do is supply the code.
-
This one uses Coroutine.au3 from my signature: #include <Coroutine.au3> $mainFunction = _CoCreate('Func mainFunction()| ;Not really sure what you want to do in your main loop, but this is what you had:|While 1| ;do some stuff| ;create a gui| ToolTip("Main script still running.", 0, 0)| Sleep(1500)|WEnd|EndFunc') $pid = _CoStart($mainFunction) While 1 If PixelGetColor(100,100) == "0x8e5a00" Then ; Some color _CoKill($pid) MsgBox(0,"ruh-roh", "Bail Man, Bail!") _CoCleanup() Exit EndIf Sleep(10) WEnd Of course this is just a very simple example, but hopefully you get the picture.
-
Yes, it works with compiled scripts on computers that don't have AutoIt installed.
-
Concatenate Variable Names?
neogia replied to MasterRaistlin's topic in AutoIt General Help and Support
Well, there's two ways to do it. The way I would do it, is: Dim $SymbolInput[10] For $i = 0 To 9 $SymbolInput[$i] = GUICtrlCreateInput(...) Next oÝ÷ Ù:&jGá +kƥDz'«Êjyæ§jºÚÊ%v)නÿ*h²+b¢{(}©e¶¢{k¢[.W¬²Ø^Ëky©ez÷§+)iÇ¢»(ëax*.Á©í¶z¨º±!ÊÞjبÊzØ^±©Â+aéz»·uçbØ^½ªâi¹^©kyÊ&éÝyÛaz|¨¹Æ§v(ëax%G+ºÚ"µÍÜ ÌÍÚHHHÈL ÌÍÝ[Þ[XÛ[]H][ ][ÝÔÞ[XÛ[] ][ÝÈ [È ÌÍÚJBÈÈÝYB^Happy hunting! Edit: @PsaltyDS: too quick for me!