Advert
LuI
Active Members-
Posts
22 -
Joined
-
Last visited
About LuI
- Birthday 08/26/1958
Profile Information
-
Location
Berlin / Germany
LuI's Achievements
Seeker (1/7)
0
Reputation
-
ImageSearch2015 on Windows 10 x64 - (Moved)
LuI replied to jmaruca's topic in AutoIt General Help and Support
Slight bug in ImageSearch2015: Hi Folks, the great tool ImagSearch2015 contains some slight bugs in documentation and code. Here's what I found: 1. Most of the files involved need a complete path to 'em in order to operate reliably. Please consider providing the file path like here for the DLL to be used: $h_ImageSearchDLL = DllOpen(@ScriptDir & "\" & "ImageSearchDLLx32.dll") 2. The function does search only on the current or primary screen: Func _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0) Return _ImageSearchArea($findImage, $resultPosition, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, $tolerance, $transparency) @DesktopWidth & @DesktopHeight return the parameters of the currently active screen only. This might be intended, but should be documented. Func _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance = 0, $transparency = 0) local $iwidth = _WinAPI_GetSystemMetrics(78), $iheight = _WinAPI_GetSystemMetrics(79) Return _ImageSearchArea($findImage, $resultPosition, 0, 0, $iwidth, $iheight, $x, $y, $iTolerance, $transparency) as a replacement. Otherwise the call could be quite unreliable depending where your intersting image is placed on the screen. Thanx to the original authors! -- LuI -
Hi, this tool looks very impressive, but I am missing a special function for SW testing. I would need to load a single (or even several) image(s) from file and then search a screen region for that/the load(ed) image(s). In my use case I have to compare parts of the UI of an application for one or more possibly displayed graphs. I need to find out if or what of a set of defined graphs is shown. Can this be done? I see most of the functionality provided, but have not seen the inverse of FFSaveBMP(...) to load such reference images from disk. ANd even in the dll, there's nothing I could identify for this purpose. Any hints? TIA and Greetings from Germany! -- UF
-
help needed using variable to run a program
LuI replied to Boss007's topic in AutoIt General Help and Support
Concatenate your string! $ilocation = "c:" $Path = "tempmyprogram.exe" run ($ilocation&$Path) HTH! -
Can anyone point me to the error codes of RunAs or Run?
LuI replied to LuI's topic in AutoIt General Help and Support
Googling for 'RunAs Error Code 1' returns a lot of links. At least a few made the impression that a fully qualified path is required as the help to RunAs() states. -- Greetings from Germany! Uwe -
Can anyone point me to the error codes of RunAs or Run?
LuI replied to LuI's topic in AutoIt General Help and Support
UEZ, thx for your solution. I assume RunAs() does really need the complete path to cmd; having cmd in the search path is not enough?! Anyway, do you have a ref to the error codes as being returned by Run() and RunAs()? I'll try my best with code tags in future. Had been away from here for looong time ;-) -
Can anyone point me to the error codes of RunAs or Run?
LuI replied to LuI's topic in AutoIt General Help and Support
Sorry guys, I was more interested in WHAT error 1 means resp. where I can read that. But here we go: $Shl = "command /c" $Cmd = "PGRestaWS" $usr = "yyy" $Domn = "xxx" $Shw = @SW_MINIMIZE $AsAdmin = 0 If $AsAdmin Then $PID = RunAs($usr, $usr, $Domn, 4, $Shl&$Cmd, _ $Path, $Shw, 0x3) ; Call a console ; Call a console as admin $MyError=@error Else $PID = Run($Shl&$Cmd, $Path, $Shw, 0x3) ; Call a console as user $MyError=@error EndIf -
Assigning a local array with 0 elements
LuI replied to SlowCoder74's topic in AutoIt General Help and Support
Wow, that's impressive: I found a 'problem' in AutoIT and it is fixed beforehand, allthough still in alpha-state ;-) Guys, I wanted to crawl through a tree in a filesystem an do something with special sub-dirs. Those can show up in any position within the tree. What I did (with LabVIEW) was creating an $array_of_pathes and initializing it by the start path. Than While Ubound($array_of_pathes) ; is not empty $ThisPath = _arrayPop($array_of_pathes) ; remove last element $SubDirs=_FileListToArray($array_of_pathes, "*", 2) ; process elements of $SubDirs and append all elements to $array_of_pathes ; this may add some new elements WEND Rewriting it to AutoIT caused an runtime error because, at the beginning, the initialized array got emptied by the _arrayPop, which causes IsArray($array_of_pathes) to return 0. While this can be avoided by introducing another element at index 0 and adopting the tests, it shows that at this time AutoIT does not support empty arrays. If you change that behaviour you should definitely check all the UDF in _array and provide proper warnings about the changed behaviour. Nevertheless introducing empty arrays is a good idea IMHO! Thanx for your work! -- Greetings from Germany! Dr. Uwe Frenz -
Bug in Parser Stumpii, at first let me express my thanx for your debugger. Having tried it for just about a single hour and it at least has the potential to become one of my best tools. Thanx a lot! I just ran into a problem/bug. I probably can work around this, but it seems to be a bug anyway, so I'll inform you: In a rather complex project (at least for me) I have added quite a lot of debugging code a la $mDbg=1 if $mDbg Then ConsoleWrite("$SDrs: "&_ArrayToString($SDrs, ", ",1)&@CRLF) ... If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->") This has worked fine with your debugger except the last of the above lines. Your debugger has created the following code fragment from that: AutoIt_Debugger_NextLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended) If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->") AutoIt_Debugger_FinishedLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended) AutoIt_Debugger_SendVariable("$mDbg", $mDbg, @error, @extended) AutoIt_Debugger_SendVariable("$SearchFiles", $SearchFiles, @error, @extended) AutoIt_Debugger_SendVariable("$SDrs", $SDrs, @error, @extended) If $mDbg then AutoIt_Debugger_SendConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->", @error, @extended) This is obviously wrong, as $SearchFiles was never been used as a variable, but as a name that implements the named object is a variable. I get an AutoIt error message box stating Line 198: (File "C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Debug\Compressiontesttool.Debug Script.au3"): AutoIt_Debugger_SendVariable("$SearchFiles", $SearchFiles, @error, @extended) AutoIt_Debugger_SendVariable("$SearchFiles", ^ ERROR Error: Variable used without being declared. I'll rename those name strings for now. Again thx for your work. Greetings from Germany! -- Uwe
-
Stumpii, at first let me express my thanx for your debugger. Having tried it for just about a single hour and it at least has the potential to become one of my best tools. Thanx a lot! I just ran into a problem/bug. I probably can work around this, but it seems to be a bug anyway, so I'll inform you: In a rather complex project (at least for me) I have added quite a lot of debugging code a la $mDbg=1 if $mDbg Then ConsoleWrite("$SDrs: "&_ArrayToString($SDrs, ", ",1)&@CRLF) ... If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->") This has worked fine with your debugger except the last of the above lines. Your debugger has created the following code fragment from that: AutoIt_Debugger_NextLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended) If $mDbg then ConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->") AutoIt_Debugger_FinishedLine("C:\Dokumente und Einstellungen\frenz\Eigene Dateien\AutoIT3\Compressiontesttool.au3", "Compressiontesttool.au3", 74, False, @error, @extended) AutoIt_Debugger_SendVariable("$mDbg", $mDbg, @error, @extended) AutoIt_Debugger_SendVariable("$SearchFiles", $SearchFiles, @error, @extended) AutoIt_Debugger_SendVariable("$SDrs", $SDrs, @error, @extended) If $mDbg then AutoIt_Debugger_SendConsoleWrite("$SearchFiles ["&$SDrs[0]&"]->", @error, @extended) This is obviously wrong, as $SearchFiles was never been used as a variable, but as a name that implements the named object is a variable. I get an AutoIt error message box stating I'll rename those name strings for now. Again thx for your work. Greetings from Germany! -- Uwe
-
How can I make two functions work simulanteously?
LuI replied to sharrakor's topic in AutoIt General Help and Support
Is there any way to communicate between those 'instances' rather than using files? Global variables? Queues? Occurences?TIA! -
Jennico, at first thanx for that UDF. Looks like it could help me out in one or the other way. My 1st idea was to get a 'watcher 'thread'' for unexpected or unwanted pop-ups. Maybe it could be used for 'kind-of 'watches' when debugging code. Some more ideas might come. You proposed on Nov 9 2008, 01:36 PM: Did you find any time for that? Greetings from Germany! -- Uwe
-
How to make an "include file" for a drive letter?
LuI replied to Diana (Cda)'s topic in AutoIt General Help and Support
When having at least one NTFS drive in your machine, you can 'redirect' or mount or whatever you'd like to tell it all drives into an empty NTFS directory and get rid of that nasty drives. I have a German XPP, so all instructions are my personal re-translation and may be wrong: * Go to the system administration (either via control_panel or a right-click in explorer to 'workplace' * Activate 'volume menagement' * Select the volume you'd like to redirect * right-click and choose 'change drive letter and pathes' * select <Add> and 'provide in this empty folder' * navigate to that folder, approve and than remove the drive letter the system had provided This way you get a fixed 'root path' to that volume that does not collide with drive letters that might have been associated by other means. Just my 0.02 -
Cannot get to password protected sites
LuI replied to sheck's topic in AutoIt General Help and Support
sheckandar, here's what I did ; open IE & navigate to Visualweb, wait for load $o_IE = _IECreate () _IENavigate ($o_IE, "http://getemed1:8080/visualtime/index.jsp") _IELoadWait($o_IE) ; get the frame_object, form and controls $o_Doc =_IEDocGetObj($o_IE) $o_Mainframe =_IEFrameGetObjByName($o_IE, "mainframe") $o_LoginForm = _IEFormGetObjByName($o_Mainframe, "login") $o_UserID = _IEFormElementGetObjByName($o_LoginForm , "userid") $o_Passphrase = _IEFormElementGetObjByName ($o_LoginForm , "password") ; set values, submit & wait for reload _IEFormElementSetValue ($o_UserID, "YourUserName") _IEFormElementSetValue ($o_Passphrase, "YourPW") _IEFormSubmit ($o_LoginForm) ;Check for reload of page $Result = _IELoadWait($o_IE, 1000) The problem is you need to know some details about the visited page. Try to 'view' its source code. In my example 'mainframe' is the name of one of the frames containing the login-form. That form is named 'login' and has the elements named 'userid' and 'password'. After having set those contents I submit the form and check for the reload of that page HTH -
"Need to change au3.properties: BETA_AUTOIT = 0" ?
LuI replied to LuI's topic in AutoIt General Help and Support
Jos, I have and had tried to change and/or comment that line out with no success. Anyhow, I had run the installer once again yesterday and still had thad message. But after shutdown and restart this morning it's gone. Thanx for your support!