8 posts in this topic
A UDF with Extended Functions for Window Management
This UDF is still in the development phase. All code works and should be generally bug free, however function names and parameters are subject to change.
Fixes _WindowGetClassList's barbaric returning of a @LF separated string instead of an array.
Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
None reported To Do:
To Be Decided. Opinions welcome! Upcoming Changes:
To Be Decided.
I have got this script
$iPid = run("Powershell Get-ADUser "&$UserNameReaded&" -Properties * | select -Expand EmailAddress" , @WindowsDir , @SW_HIDE , 0x2) $MailUser = "" While 1 $MailUser &= StdoutRead($iPID) If @error Then ExitLoop EndIf WEnd GUICtrlSetData ($Label015, ""&$MailUser) If $MailUser = "" Then GUICtrlSetData ($Label017 , "N/A"&$MailUser) Everything is working fine i got correct value
For my account the value is for exemple :
J.Personnal@Enterprise.com in the $Label017 the value is correct i have still
J.Personnal@Enterprise.com If i use :
Send (""&$MailUser) i have now :
J.Personnalnterprise.com Is there a way to correct this ?
Okay so I am not sure if I can do this or not with the code I currently have but, I would like to send lastname and the first name with a comma inbetween.
so it would look like "last name,first name"
right now I just have it sending the last name.
any help or sugestions are appreciated.
$r = 1 Local $aArray = _Excel_RangeRead($oExcel, Default, Default) For $i = 1 To UBound($aArray) - 1 ;$i =0 Start from row A $sR1 = $aArray[$i] ;status $sR2 = $aArray[$i] ;first name $sR3 = $aArray[$i] ;Last name $sR5 = $aArray[$i] ;Email Address WinWaitActive ("[CLASS:MGUIWin]") Sleep (100) ControlSend("[CLASS:MGUIWin]", "", "Edit2", $sR3, & @CR) $r = $r + 1 If $r > $sBox Then Exit Endif Next
I've been trying to automate a process to check in the GUI of a Java program for a certain condition. When I use the Autoit Window information tool I don't get anything under the control tab, which seems to be normal for a Java program. I've been able to automate what I need using ControlSend and checking for the condition using ImageSearch but the Java program will not accept ControlSend unless it is the active window. I'd like to run the script while the window is inactive so I can still use the PC but haven't been able to come up with a solution other than a virtual machine. I even tried sysinternals desktops to create a second virtual desktop but that just causes WinActivate to return a failure after you switch to another virtual desktop. Does anyone have any ideas for getting a window to think its active when its not or an alternative to ControlSend that may work?
I'm hoping this is feasible... I made a program that resides in the system tray. One of the tray items runs a function that waits for the user to click on a window to get the window title.
I would like for the mouse cursor to change to the cross while waiting for user input. I have tried using GUISetCursor(3), but from my understanding this only changes the cursor for an AutoIt GUI window.
How could I go about changing the mouse cursor for the user's environment, not just for the AutoIt window?