
JoeCool
Active Members-
Posts
166 -
Joined
-
Last visited
Everything posted by JoeCool
-
Interesting I 'll look at it
-
Hello, On one side I have few Autoit automation scripts already working perfectly and on the other side I have few python lib already working 🐵 Of course I can load autoitX.dll and call some functions or I can use this python autoitX wrapper from pypi : https://github.com/jacexh/pyautoit It works fine for my quick tests. But my autoit scripts need some functions from UserDefinedFunc, especially GuiListView Is someone know is someone here has made a implementation for UDF (GuiListView) ? Thanks
-
I really enjoy this debugger I just stump on 2 bugs, on v0.47 can we still report them here ? This one is probably already know and not really a bug but, because the files are put in the debug folder, @scriptdir report that folder, so if you have some files to open don't forget to copy them manually into the Debug folder. The other one made me smile ... here a pic of the error... Ok I have a big array [20][7][10][2] with a big Initialization string .... Language check is fine and its works fine when I run the script. But poor debugger... it said, whatthehell is that string, I'm out of here
-
Bug (maybe) in guiSetState( @SW_RESTORE, $gui ) ....
JoeCool replied to JoeCool's topic in AutoIt GUI Help and Support
Arrghh ! I didn't see that option before .... It woks when you cancel Windoze behavior... Thanks ! -
Bug (maybe) in guiSetState( @SW_RESTORE, $gui ) ....
JoeCool replied to JoeCool's topic in AutoIt GUI Help and Support
Ok ? 40 views and nobody ever see that or thing it is a bug ??? lol -
I'm pretty sure all autoit gurus here will have an answer for me :-) so here the code : #include <guiconstants.au3> #include <constants.au3> func wndMinimize() guiSetState( @SW_MINIMIZE, $gui ) endfunc func wndMaximize() guiSetState( @SW_MAXIMIZE, $gui ) endfunc func wndRestore() guiSetState( @SW_RESTORE, $gui ) endfunc func wndClose() exit endfunc opt( "GUIOnEventMode", 1) $flag = bitOr( $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS) ;$flag = 0 $gui = guiCreate( "Hello World", 200, 200, 200, 200, $flag ) guiSetOnEvent( $GUI_EVENT_MINIMIZE, "wndMinimize" ) guiSetOnEvent( $GUI_EVENT_MAXIMIZE, "wndMaximize" ) guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" ) guiSetOnEvent( $GUI_EVENT_CLOSE, "wndClose" ) guiSetState( @SW_SHOW ) while 1 sleep( 1000 ) wend I basicly just redefine Minize, Maximize, Restore and Close ... because in my application I will need to do some stuff in there .... but here the problem, script start and display a hello world, if I minimize it, and click on the icon on the task bar( actually restoring it ) the restore works fine, window is at the right place... but if I maximine the window and minimize it , the restore bring back a window NOT maximized ! if you comment out this line guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" ) and let windoze do the restore a maximized window minimized in the task bar will be restore as a maximized window, so do you think ? ... maybe there is a "bug" in the "guiSetState( @SW_RESTORE, $gui )" ... :-)
-
Thanks I did delete my post!
-
func optional parameters suggestion ...
JoeCool replied to JoeCool's topic in AutoIt Technical Discussion
duh ! and it is my exact first message, why not extend a bit the language to have optional byreference paramaters in function definition .?????... -
func optional parameters suggestion ...
JoeCool replied to JoeCool's topic in AutoIt Technical Discussion
ok then, so base on your comments could you suggest to remove completly byreference parameter, 'cause there is not gain to have it lol it will lead to a less complicated language to maintain !!! but ... i'm still thinking, we should have optional byreference paramaters in function definition .... -
Currently passing optional parameters is by value ... so copying alot of arrays is not fun sometime... I will love to have something like this (optional byref parameter ) With the current syntax ...(the last parameter could be byref and optional) func blah( $x, byref $a, byref $b = 0) ... endfunc Passing no value is not more difficult than before, I guess ... Passing something byref is just passing a pointer(of some sort on the stack).... (we need to deal with initiazation to something not 0) Better solution will be to have a opt specifier ... func blah( $x, byref $a, opt byref $b , opt $c = 22 ) ... endfunc because initializing byref var (a pointer) to something can be dangerous ... func blah( $x, byref $a, byref $b = 0x1231) ;not good endfunc what do you thing .... it can be pretty useful I think
-
strange binarie noob question ....
JoeCool replied to JoeCool's topic in AutoIt Technical Discussion
yes , of course maybe usuful when i will code some read/write byte port (com, lpt, usb ... ) drivers in autoit ... something like ... $arr[1024] stuff with all strings and all protocol bytes (0x00 to 0xFF ) stringToBinary(stringFromASCIIArray($arr)) to have a byte buffer ... i should stop drinking beer now and go to sleep ! -
strange binarie noob question ....
JoeCool replied to JoeCool's topic in AutoIt Technical Discussion
oh i see i found it.... binary( ) has nothing to do with hex number neither binary NUMBER (b10010100) ... it can take 2 forms of string not interpreted the same way... binary("abc") = binary("0x616263") $str = binary("hello world") is the same has $str = stringToBinary("hello world") who will just encode caracters to ascii byte default encoding value ... and binary("0x616263") is a raw encoding form ... EDIT i changed this message a few time... i was exploring the help file -
why 0x00270FF6 != 2559990 ? unsigned hex positive int32 can someone explain me that please if binary("0x00270FF6") = 2559990 then msgbox(0, "True", "" ) else msgbox(0, "False", "" ) endif
-
lol ur right ... I didn't think hard enough I don't use the _array package, i have since long time my own few packages who do all that stuff (array, matrix etc), i was just writing a script for someone and wrote those 2 functions on the fly for him ... i should always think before coding
-
bump ! so nobody find this should be in Array UDF ? it is already in my udf anyway
-
there it is, 2 silly functions to convert 0 base index array and 1 base index array... i guest the _array UDF should have something like that ... 1base index array is kind of array with array size at position 0 ex. stringSplit #include <Array.au3> func array0ToArray1( byref $a0 ) local $a1[ubound($a0) + 1], $i for $i = 1 to ubound($a0) $a1[$i] = $a0[$i - 1] next $a1[0] = ubound($a0) return( $a1 ) endfunc func array0FromArray1( byref $a1 ) local $a0[$a1[0]], $i for $i = 0 to $a1[0] - 1 $a0[$i] = $a1[$i + 1] next return( $a0 ) endfunc global $a0 global $a1 = stringSplit( "qwerty", "" ) _arrayDisplay($a1, "") $a0 = array0FromArray1( $a1 ) _arrayDisplay($a0, "") $a1 = array0ToArray1( $a0 ) _arrayDisplay($a1, "")
-
I took a look at you code few weeks ago and found your are redisplaying icons twice maybe using something like this will help _GUICtrlListView_beginUpdate($hExplorer_List) display icons only once _GUICtrlListView_endUpdate($hExplorer_List) in this way you are not fighting windoze desktop refresh .
-
noob suggestion here reading a section or sometime completly the file in an array can help if u do many search in it ...
-
yes i just read that nice thread :) im not sure multiple redefinitions in the same namespace is a nice way to reinitilization .... but im old school...
-
AutoItSetOption("MustDeclareVars", 1) foo() exit func foo( ) local $i, $j local $xy[2] = [1,2] local $xy[4] local $xy[3] = [1,2,3] local $xy[2] = [0,0] for $i = 1 to 2 local $xy[3] = [$i,$i,$i] $j = $i next $xy[2] = 9 endfunc OMG !, I'm so old school, I never thought to redefine variables like that ! But you're right who need reinitialization when when you can redeclare all you want ! in my head it's not the same but here it seems to be the same.
-
It could be really handy to be able to reinitialize array in the code like this ... standard declaration dim $xy[2] = [0,0] somewhere in the code $xy = [10,4] instead of $xy[0] = 10 $xy[1] = 4 It could also be handy to be able to reintialize in a standard declaration way after a Redim, ofcourse in that case we will lose previous values... dim $a[2] = [0,1] ... redim $a[3] = [3,2,1] what do u thing ? of course it is a little bit more job for the interpreter, but less prone to error maybe
-
Cool
-
cool exactly what i was looking for ! thanks a lot guys ! i found a small bug ... but it's not only your fault ... sometime i go to other forums ... (it's a shame i'm not often here) :oP and i like to drag and drop the webbrowser link of interesting message on my desktop ... so in some sites like Ubuntu forum the thread link title start often with [ubuntu] Hello world blah blah so when i save the link on my desktop, the shortcut name is also [ubuntu] Hello world blah blah that is not save correctly into you .ini file [ubuntu] become of an .ini section. ... maybe some error / warning message could be useful. another improvement maybe, config file name could reflect the name in the gui ex. IconConfigFile003.icf doesn't reflet my guiname "blahblah" inside GUI, sugg, IconConfigFile003blahblah.icf so i can easily restore from command line the right layout without searching alot into files. but hey ur thing is great !
-
I tried to download the zip file and AVG Free found a worm/autoit.PBD in the zip file !?
-
AntiVirus Kaspersky Internet Security and Autoit ...
JoeCool replied to JoeCool's topic in AutoIt General Help and Support
FYI I put autoit.exe into Kaspersky Trusted Zone, I gave it permission to do whatever it want P but it seems I also have to keep Kaspersky self protect option unactive. for the moment it fixed my problem ...