Leaderboard
Popular Content
Showing content with the highest reputation on 11/02/2018 in all areas
-
"Am I missing something basic?" Yes. Use, GUICtrlSetOnEvent($testbutton, "_TestFunc")) Not GUISetOnEvent($testbutton, "_TestFunc")3 points
-
[New Version] - 16 Apr 2022 Added: A new function _GUIExtender_Hidden_Control which allows you to specify which controls should not be automatically reshown when it redraws the GUI. You no longer need to hide/show the control within the script - this function does that as well as telling the UDF whether or not to show it on redraw. New UDF and an additional example in the zip below. Previous changes: Changelog.txt ........................................................................... The GUIExtender UDF allows you to have multiple sections within your GUIs which can be either static or extendable. The extendable sections can be extended and retracted either by UDF created buttons or programmatically by other controls or HotKeys. The controls on the sections are fully functional and there is no overlap problem when retracted (see the details section if you want to know how). The UDF can be used in both MessageLoop and OnEvent modes and with both native and UDF created controls, as well as embedded objects and child GUIs. -------------------------------------------------------------- Note: This is a new recoded and (I hope) simplified version of my earlier UDF of the same name. If you move to this new version there are several script-breaking changes, so please look carefully at the included example scripts to see where things have changed. Here is a quick guide to how the UDF function list has been altered: Old function New function Comment _Init _Init Unchanged _Clear _Clear Unchanged _Section_Start _Section_Create New default parameters for position and size _Section_End Deprecated _Section_Create used to end all section creation _Section_Action _Section_Activate Simple rename _Action _EventMonitor Simple rename _Section_Extend _Section_Action Simple rename, but now uses integer parameter for required state _Section_State _Section_State Unchanged _Restore Deprecated Now automatic _ActionCheck Deprecated Now automatic _HandleCheck Deprecated Now automatic _Obj_Data _Obj_Data Unchanged - _Handle_Data Single call on creation replaces multiple _HandleCheck calls Note: The _EventMonitor function must be added to the idle loop for the automatic actions above to occur -------------------------------------------------------------- Details of how the UDF works for those who are interested: The UDF and plenty of commented examples are in the attached zip: GUIExtender.zip M231 point
-
INI Editor
seadoggie01 reacted to boomingranny for a topic
1 point -
Gui Banner examples
MovieScreener2013 reacted to mikell for a topic
It seems that SplashTextOn is exactly what you are looking for1 point -
Serialize and Activate Windows 10 Ent - (Moved)
FrancescoDiMuro reacted to Danp2 for a topic
Why not use slmgr.vbs instead of trying to automate a GUI?1 point -
[SOLVED] How do I use the IE UDF to click on a button on a webpage.
nooneclose reacted to Danp2 for a topic
You need to reestablish a connection to the IE browser since it's getting lost in the initial _IELoadWait ( $_IESTATUS_ClientDisconnected ). Therefore, the logical way to handle this is to use _IEAttach to reconnect to IE. As far as what value to use, it depends on the page being displayed. For the demo site you posted earlier, I would think either of the following would work -- $oIE = _IEAttach("Work Order Tracking") $oIE = _IEAttach("maximo-demo75.mro.com", "url")1 point -
OMG! That one keeps tripping me up!!! Thank you!!!!!1 point
-
Possible to retrieve html into text file?
FrancescoDiMuro reacted to Jos for a topic
Ok, this is your last warning or else you will follow the same route as another member, which receive a month vacation. So to make sure I am absolutely clear: Stop the begging for code approach Start putting in some real effort yourself Stop the annoying bumping of threads This thread will be closed and do not reopen any similar question, as you have been helped enough! Jos1 point -
Understand it can be confusing, but like the link shows, we worked on it and found the issue and was fixed in 18.708.1148.1 as documented in the history.log: *** Updated AutoIt3Wrapper v18.708.1148.0 (Jos) - 18.703.1808.1 renamed "#AutoIt3Wrapper_Au3Stripper_Stop_OnError" to "#AutoIt3Wrapper_Au3Stripper_OnError" with now as options S,C,F,Stop,Continue,ForceUse - 18.708.1148.1 Added #include <WinAPIFiles.au3> back in the included file list to ensure backward compatibility. - 18.708.1148.2 Added "Tidy_Stop_OnError" support to the AutoIt3Wrapper.INI file. Changed HiDPI settings for Win 10 compatibility. - 18.708.1148.4 Added logic to be able to display Console Output of script that have #RequireAdmin while SciTE runs at normal level. - 18.708.1148.5 Added support to allow to Stop Execution or Restart for scripts with #RequireAdmin while SciTE runs at normal level. It won't hang anymore when you reply No on the UAC and detect the elevated process didn;t start. - 18.708.1148.6 Reverted HiDPI changes made in 18.708.1148.2 as problems are reported. needs investigation. - 18.708.1148.7 Changed check for RequireAdmin AutoIt3Wrapper startup. It is due to the release of Autoit3 you are running which doesn't include WinAPIFiles.au3 in WinAPI.AU3 yet, and we had it removed from AutoIt3Wrapper assuming it always did. Either... That is indeed fixed. Jos1 point
-
Correct, we fixed that issue here remember?...:1 point
-
Moved to Beta... Thanks to the few that did bother to assist testing and give me feedback, it is really appreciated. Jos1 point
-
How to automate button click in a GUI?
Earthshine reacted to junkew for a topic
Be aware uiawrappers can go from simple to complex for hundreds of screens in a more maintainable way to even splitting your recognition strings in a separate config file. For a few buttons you could use x y mouseclick but if your app redesigns the ui you have a lot of work when it are dozens of mouseclicks. With mouseclick you do the job of finding x y. With recognition strings the computer does the job of finding x y either controlclick or uia or other udf.1 point -
ieform problems
FrancescoDiMuro reacted to JLogan3o13 for a topic
Ok, we are not going to support this, as one would have thought common sense would have told you. Please read the forum rules before posting again, and engage the gray matter before hitting enter. 2. Do not post material that could be considered pornographic, violent or explicit1 point -
How to automate button click in a GUI?
Xandy reacted to FrancescoDiMuro for a topic
Hi @Iulia_Vascan, and welcome to the AutoIt Forums First of all, when you call your Control* functions, you don't have to write the square brackets, because the only mean that they are optional parameters. Then, you have to see the Control tab in the AutoItWindowsInfoTool instead of Mouse tab; from there, you can see the Control class, ID, and so on, which you can use in your Control* functions. So, run once again the AutoItWindowInfoTool and look at the Control button, in which there are all the information needed to use ControlClick() function Once you have finished, post again your code, replacing all the information you got1 point -
Late ok, much later, but also a quick option to remove the control characters. Simply do it twice with Stringreplace() -> one time for each control character... #include <String.au3> $sText = "Blah blah" & @CRLF & _ "SQUAD," & @CRLF & _ "NAME_RIFLE_formation)," & @CRLF & _ "blah blah" $sText = StringReplace($sText, @CR, "") ;CR out $sText = StringReplace($sText, @LF, "") ;LF out ConsoleWrite($sText & @CRLF) Regards, Tombac1 point
-
I think this is much better solution (if you still wanna use it WITHOUT WinApi.au3), also CTRL+A works for combo by default: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> $Form1 = GUICreate("Form1", 600, 400) $Edit1 = GUICtrlCreateEdit("Some text in Edit1" & @CRLF & "focus me, and press CTRL+A", 0, 0, 300, 350) $Edit2 = GUICtrlCreateEdit("Some text in Edit2" & @CRLF & "focus me, and press CTRL+A", 300, 0, 300, 350) $Combo1 = GUICtrlCreateCombo('', 0, 360, 600);CTRL+A already works for combo, by default. GUICtrlSetData(-1, 'Some Data 1|Some Data 2|Some Data 3|Some Data 4|Some Data 5|Some Data 6', 'Some Data 1') GUISetState(@SW_SHOW) Global $hSelAll = GUICtrlCreateDummy() Dim $AccelKeys[1][2] = [["^a", $hSelAll]] GUISetAccelerators($AccelKeys, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hSelAll _SelectAllTextInEdit() EndSwitch WEnd Func _SelectAllTextInEdit();will make select all text in eny focused edit, as long as it is edit inside $Form1 winhandle because we bound GUISetAccelerators to $Form1 Local $theHandle = DllCall("user32.dll", "hwnd", "GetFocus") If NOT @error Then $TheClass = DllCall("user32.dll", "int", "GetClassNameW", "hwnd", $theHandle[0], "wstr", "", "int", 4096) If NOT @error Then If $TheClass[2] = 'Edit' Then _GUICtrlEdit_SetSel($theHandle[0], 0, -1) EndIf EndIf EndFunc1 point
-
Here's an example: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> #include <WinAPI.au3> $Form1 = GUICreate("Form1", 600, 400) $Edit1 = GUICtrlCreateEdit("Some text in Edit1" & @CRLF & "focus me, and press CTRL+A", 0, 0, 300, 400) $Edit2 = GUICtrlCreateEdit("Some text in Edit2" & @CRLF & "focus me, and press CTRL+A", 300, 0, 300, 400) GUISetState(@SW_SHOW) Global $hSelAll = GUICtrlCreateDummy() Dim $AccelKeys[1][2] = [["^a", $hSelAll]] GUISetAccelerators($AccelKeys, $Form1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hSelAll _SelectAllTextInEdit() EndSwitch WEnd Func _SelectAllTextInEdit();will make select all text in eny focused edit, as long as it is edit inside $Form1 winhandle because we bound GUISetAccelerators to $Form1 Local $theHandle = _WinAPI_GetFocus() Local $TheClass = _WinAPI_GetClassName($theHandle) If $TheClass = 'Edit' Then _GUICtrlEdit_SetSel($theHandle, 0, -1) EndFunc1 point
-
Update for _ScreenCapture_CaptureV2 _ScreenCapture_CaptureWndV2 Added optional parameter $iBitBltFlag - Flag to pass to the _WinAPI_BitBlt operation default it BitOR($SRCCOPY, $CAPTUREBLT) instead of $SRCCOPY only Tested with AutoIT 3.3.6.1 ScreenCaptureV2.au31 point
-
An alternative to the standard '_ScreenCapture_CaptureWnd' in order to capture the layered windows as well. ; #FUNCTION# ==================================================================================================================== ; Name...........: _ScreenCapture_CaptureWndV2 ; Description ...: Captures a screen shot of a specified window. This function is an alternative to '_ScreenCapture_CaptureWnd'. ; It is able to take screenshots of layered windows (drawn by the graphic card). See 'remarks' below. ; Syntax.........: _ScreenCapture_CaptureWndV2($sFileName, $hWnd[, $iLeft = 0[, $iTop = 0[, $iRight = -1[, $iBottom = -1[, $fCursor = True]]]]]) ; Parameters ....: $sFileName - Full path and extension of the image file ; $hWnd - Handle to the window to be captured ; $iLeft - X coordinate of the upper left corner of the client rectangle ; $iTop - Y coordinate of the upper left corner of the client rectangle ; $iRight - X coordinate of the lower right corner of the rectangle ; $iBottom - Y coordinate of the lower right corner of the rectangle ; $fCursor - If True the cursor will be captured with the image ; Return values .: See remarks ; Remarks .......: 1/ If FileName is not blank this function will capture the screen and save it to file. If FileName is blank, this ; function will capture the screen and return a HBITMAP handle to the bitmap image. In this case, after you are ; finished with the bitmap you must call _WinAPI_DeleteObject to delete the bitmap handle. All coordinates are in ; client coordinate mode. ; ; 2.1/ Layered windows do not appear on screenshots taken by '_ScreenCapture_Capture' because it uses the desktop's ; handle whereas the layered windows are drawn directly by the graphic card. 2.2/ '_ScreenCapture_CaptureWnd' ; is a wrapper of '_ScreenCapture_Capture' and, therefore, has the same limitations. 2.3/ Instead, ; '_ScreenCapture_CaptureWndV2', THIS FUNCTION, is using the handle of the targetted window to perfom its task ; (in a similar way than '_ScreenCapture_Capture'uses the Desktop's handle). ; ; Author ........: Patryk Szczepankiewicz (pszczepa at gmail dot com) ; History .......: JAN 21, 2009 - Created ; OCT 18, 2010 - First release on the AutoIT forum ; OCT 28, 2010 - Cleaned the border code and fixed the capture of the cursor. ; APR 06, 2011 - Updated for AutoIT 3.3.6.1 ; Related .......: _WinAPI_DeleteObject ; Link ..........; http://www.autoitscript.com/forum/index.php?showtopic=65008 ; Example .......; No ; Credits .......: Based on Paul Campbell's '_ScreenCapture_Capture' function and inspired by Jennico's '_WinGetBorderSize'. ; =============================================================================================================================== Func _ScreenCapture_CaptureWndV2($sFileName, $hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $fCursor = True) Local $tRect Local $iWndX, $iWndY, $iWndW, $iWndH Local $tClient Local $iBorderV, $iBorderT Local $iPicHeight, $iPicWidth Local $iPicCursorX, $iPicCursorY Local $hDDC, $hCDC, $hBMP, $aCursor, $aIcon, $hIcon ; Get the absolute coordinates of the window $tRect = _WinAPI_GetWindowRect($hWnd) ; Get useful variables $iWndX = DllStructGetData($tRect, "Left") $iWndY = DllStructGetData($tRect, "Top") $iWndW = DllStructGetData($tRect, "Right") $iWndH = DllStructGetData($tRect, "Bottom") ; Assign automatic values: the right and bottom are computed as ; the width and height of the absolute coordinates of the window. If $iRight = -1 Then $iRight = $iWndW - $iWndX If $iBottom = -1 Then $iBottom = $iWndH - $iWndY ; Check user values: check that caller is not putting the top-left ; corner out of the window. If $iLeft > $iWndW Then $iLeft = $iWndX If $iTop > $iWndH Then $iTop = $iWndY ; Check user values: check that caller is not asking for a ; screenshot bigger than the window itelf. If $iRight > $iWndW Then $iRight = $iWndW If $iBottom > $iWndH Then $iBottom = $iWndH ; Compute the size of the final picture. $iPicWidth = $iRight - $iLeft $iPicHeight = $iBottom - $iTop ; Compute the borders sizes $tClient = _WinAPI_GetClientRect($hWnd) $iBorderV = (($iWndW - $iWndX) - DllStructGetData($tClient, "Right")) / 2 $iBorderT = ($iWndH - $iWndY) - DllStructGetData($tClient, "Bottom") - $iBorderV ; Transfert color data $hDDC = _WinAPI_GetDC($hWnd) $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iPicWidth, $iPicHeight) _WinAPI_SelectObject($hCDC, $hBMP) _WinAPI_BitBlt($hCDC, 0, 0, $iPicWidth, $iPicHeight, $hDDC, $iLeft - $iBorderV, $iTop - $iBorderT, $SRCCOPY) ; Add the cursor on the screenshot If $fCursor Then $aCursor = _WinAPI_GetCursorInfo() If $aCursor[1] Then $hIcon = _WinAPI_CopyIcon($aCursor[2]) $aIcon = _WinAPI_GetIconInfo($hIcon) $iPicCursorX = $aCursor[3] - $aIcon[2] - $iWndX - $iLeft $iPicCursorY = $aCursor[4] - $aIcon[3] - $iWndY - $iTop _WinAPI_DrawIcon($hCDC, $iPicCursorX, $iPicCursorY, $hIcon) EndIf EndIf ; Clean and save data _WinAPI_ReleaseDC($hWnd, $hDDC) _WinAPI_DeleteDC($hCDC) If $sFileName = "" Then Return $hBMP _ScreenCapture_SaveImage($sFileName, $hBMP) EndFunc ;==>_ScreenCapture_CaptureWndV2_ScreenCapture_CaptureWndV2.au31 point