Leaderboard
Popular Content
Showing content with the highest reputation on 01/14/2021 in all areas
-
Agree, but if you invoke secondary windows (like save as) it will appear on your screen.2 points
-
What is faster?
axxbryan and one other reacted to argumentum for a topic
Faster: 1 file. Distribution: 1 file. Maintenance: many files. Case closed2 points -
False, silent installs do not interact with GUI controls. They simply execute code. Yes, those can interact with hidden windows, but send and mouseClick require that the window is in focus. Yes there is one that I used in the past to "hide" an application while it is still in focus. You can make the window totally transparent, and block all inputs from the user while the installer interact with the application. This of course is only viable for very short period of time...2 points
-
Combobox search key choice ?
seadoggie01 reacted to Nine for a topic
Here a way you could do it : #include <GUIConstants.au3> #include <GuiComboBox.au3> #include <Constants.au3> Example() Func Example() ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 300, 200) ; Create a combobox control. Global $idComboBox = GUICtrlCreateCombo("AItem 1", 10, 10, 185, 20) Local $idButton_Close = GUICtrlCreateButton("Close", 210, 170, 85, 25) ; Add additional items to the combobox. GUICtrlSetData($idComboBox, "BItem 2|CItem 3|DItem 4", "EItem 2") GUISetState() GUIRegisterMsg($WM_COMMAND, WM_COMMAND) Local $sComboRead = "" ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idButton_Close ExitLoop Case $idComboBox $sComboRead = GUICtrlRead($idComboBox) MsgBox($MB_SYSTEMMODAL, "", "The combobox is currently displaying: " & $sComboRead, 0, $hGUI) EndSwitch WEnd EndFunc ;==>Example Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) Local $iIDFrom = _WinAPI_LoWord($iwParam), $iCode = _WinAPI_HiWord($iwParam) Local $sText, $sInd If $iIDFrom = $idComboBox Then If $iCode = $CBN_EDITCHANGE Then $sInd = _GUICtrlComboBox_GetEditText($idComboBox) For $i = 0 To _GUICtrlComboBox_GetCount($idComboBox) - 1 _GUICtrlComboBox_GetLBText($idComboBox, $i, $sText) If StringInStr($sText, $sInd) Then _GUICtrlComboBox_SetCurSel($idComboBox, $i) ExitLoop EndIf Next EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND1 point -
Silent Installation (To software there is no silent switch)
PHAK reacted to Earthshine for a topic
Yes, if you can hide it, he says it should work, or you could move it off screen so it isn't visible.1 point -
Script Restart - (Locked)
seadoggie01 reacted to Jos for a topic
What exatly are you redeeming for multiple accounts?1 point -
Func prepareNox() ; Prepare Nox Player If Not WinExists("[CLASS:Qt5QWindowIcon]") Then Exit Local $hNox = WinActivate("[CLASS:Qt5QWindowIcon]", "") ; Instead of: Sleep(1000) WinWaitActive(hNox, "", 0) ; Optionally, add a timeout for it not to be active EndFunc ;==>prepareNox And since you're already using UI Automation, use it for setting the value of that box too. (Granted, I can't test this, so maybe your field doesn't support it) If you're using UIASpy, this example code is under Sample Code\Patterns... and Sample Code\Pattern Methods... Local $pValuePattern, $oValuePattern $oNoxSub.GetCurrentPattern($UIA_ValuePatternId, $pValuePattern) $oValuePattern = ObjCreateInterface($pValuePattern, $sIID_IUIAutomationValuePattern, $dtagIUIAutomationValuePattern) If Not IsObj($oValuePattern1) Then Return ConsoleWrite("$oValuePattern1 ERR" & @CRLF) ConsoleWrite("$oValuePattern OK" & @CRLF) Local $sValue = "" ; Set this to an empty string to clear the text $oValuePattern.SetValue($sValue) ConsoleWrite("$oValuePattern.SetValue()" & @CRLF)1 point
-
automatic mouse and keyboard - (Moved)
Danp2 reacted to JockoDundee for a topic
*slowly raises hand*1 point -
IE.au3 'IF' STATEMENT DOEST WORK! TREID EVERYTHING - (Moved)
monty12345 reacted to Nine for a topic
It is because your if statement is badly written. You should consider reading help file to understand the very basic of the language. If $oButton.outertext = "Next Chapter:" Or $oButton.outertext = "Next Chapter: " Then == is case sensitive, and applies only to strings while = is not.1 point -
IE.au3 'IF' STATEMENT DOEST WORK! TREID EVERYTHING - (Moved)
monty12345 reacted to argumentum for a topic
if $var = "string" then ok if $var = "string" or "string" then wrong if $var = "string" or $var = "string" then ok1 point -
There is no difference as they are all merged together at execution time.1 point
-
Silent Installation (To software there is no silent switch)
PHAK reacted to Earthshine for a topic
If you want to interact with the buttons then you can’t hide the application.1 point -
YuChan, You are rapidly becoming annoying. I told you about the "sort" style and linked to the Wiki tutorial when you last asked this question in this thread. I strongly suggest you start learning some of the basics. Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at this excellent tutorial and download the really useful book you can find at You will find other tutorials in the Wiki to which I linked you. Please do start making some effort - at present you are not doing much to help yourself. And do post your code when yo have a question - we have to ask you every single time. M231 point
-
EasyCodeIt - cross-platform AutoIt implementation
TheSaint reacted to JockoDundee for a topic
Yes, we’re lucky to have Autoit where On Error Goto 0 is built-in to every line1 point -
Silent Installation (To software there is no silent switch)
PHAK reacted to Earthshine for a topic
@PHAK You've done well. I was going to whip out an example for you but I was swamped at work. Try the suggestion above to see it it works. Other than that, i need to do this in my own dev environment so I can debug What do you mean by run in background and not be seen? I can't really figure it out either. You can compile this and it will run silent and interact with A.exe installer. It will create a log too that you can debug with.1 point -
Silent Installation (To software there is no silent switch)
PHAK reacted to abberration for a topic
I just tried WinSetState("Install", "", @SW_HIDE) on the installer and it hid the window. Are you saying that hiding the window interferes with the installation?1 point -
EasyCodeIt - cross-platform AutoIt implementation
TheSaint reacted to JockoDundee for a topic
Don’t think about it so much1 point -
EasyCodeIt - cross-platform AutoIt implementation
TheSaint reacted to seadoggie01 for a topic
Growing up without GoTo**, it confuses me. It seems to make the logic less linear and harder to follow... plus I always forget if the code just jumps to the target, or if it acts like a function and returns at some point. If I think about it long enough, I eventually realize that makes no sense, but it's confusing as heck. I'd rather use another function, a bool, or nested Ifs. Funny... I opened a particularly stubborn jar of salsa with a flat head today ** Not entirely true, they're kind of used in VBA for error handling, but I hate them. I was taught to avoid them at all costs. Especially On Error GoTo 0, which "ignores" all errors Disclaimer: I've never programmed in C1 point -
EasyCodeIt - cross-platform AutoIt implementation
TheDcoder reacted to JockoDundee for a topic
if (actual_count == count) goto skip_strip; I’ve always felt that the “goto“ statement has gotten more criticism than it deserved. It’s brutal simplicity has been its downfall... Sure it can be successfully pressed into service in totally inappropriate ways, but so can a flat-head screwdriver, and we still have those around...1 point -
You need to click on password first then it will show the SHOW/HIDE button. Both have unique ids. To find those ids, right click on password field and select "Inspect" in contextual menu. To remove it try : _WD_ExecuteScript($sSession, "return document.getElementById('id_password_toggle').remove();", "")1 point
-
_IEAttach,How to make it more stable and reliable?
Letraindusoir reacted to Nine for a topic
Hard to say with no code. Try using hwnd to attach, you cannot be wrong with this method...1 point -
#AutoIt3Wrapper_icon = "icon path" #AutoIt3Wrapper_Res_Description = "description" #AutoIt3Wrapper_Res_LegalCopyright = "author information" #AutoIt3Wrapper_Res_Fileversion = "version number" This works for me.1 point
-
Automatically wait for desired control, then manipulate it
PHAK reacted to Earthshine for a topic
This is pretty useful to me at least, I hope to others. Whenever you need to poke a button or such on a GUI, you can just make calls to this UDF and instruct it how long to wait, 0 is forever, anyway, let the code to the explaining. Feel free to help expand this UDF. I plan to create new ones as I go along that support all the Win32 and .NET Controls. Ultimately, I would like to be able to fully control any type of control, this works well with most. Just an example of what you can do. NOTE: Logger Author(s) .....: Michael Mims (zorphnog) ; the logging script can be obtained here ; https://www.autoitscript.com/forum/topic/156196-log4a-a-logging-udf/ WaitForControls.au3 log4a.au31 point -
Automatically wait for desired control, then manipulate it
PHAK reacted to Earthshine for a topic
This is and example of the output in the console. It will be automatically written to a text file if this file is compiled to exe. The log file will be named the same as the exe with a .log and be present in the same location as the running exe. Install results: 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | inst7zinst7z:Begin 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():Begin 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Waiting for: [CLASS:#32770] 7-Zip 15.14 (x64) Setup [CLASS:Button; INSTANCE:2] &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Timeout: 0 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | [CLASS:#32770] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | [CLASS:Button; INSTANCE:2] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Trace | ExitLoop:Normal - [CLASS:Button; INSTANCE:2] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():End 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():Begin 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Waiting for: [CLASS:#32770] 7-Zip 15.14 (x64) Setup [CLASS:Button; INSTANCE:2] Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Timeout: 0 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : &Install 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | [CLASS:#32770] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | [CLASS:Button; INSTANCE:2] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Trace | ExitLoop:Normal - [CLASS:Button; INSTANCE:2] 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():End 10\02\2017 14:32:30 | WIN-4VR4FSF2H8Q | Info | inst7z():End +>14:32:30 AutoIt3.exe ended.rc:0 +>14:32:30 AutoIt3Wrapper Finish Uninstall results: 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | unInst7zinst7z:Begin 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():Begin 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Waiting for: [CLASS:#32770] 7-Zip 15.14 (x64) Uninstall [CLASS:Button; INSTANCE:1] &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Timeout: 0 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | [CLASS:#32770] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | [CLASS:Button; INSTANCE:1] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Trace | ExitLoop:Normal - [CLASS:Button; INSTANCE:1] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():End 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():Begin 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Waiting for: [CLASS:#32770] 7-Zip 15.14 (x64) Uninstall [CLASS:Button; INSTANCE:1] Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Timeout: 0 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : &Uninstall 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | Control Text Search : Close 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | [CLASS:#32770] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | [CLASS:Button; INSTANCE:1] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Trace | ExitLoop:Normal - [CLASS:Button; INSTANCE:1] 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | CheckClickCtrl():End 10\02\2017 14:35:00 | WIN-4VR4FSF2H8Q | Info | inst7z():End +>14:35:00 AutoIt3.exe ended.rc:0 +>14:35:00 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.77321 point -
If you need a nicely formatted time which include milliseconds (h:mm:ss.mmm): $ms = {wherever you get your milliseconds from} $time = StringFormat("%d:%.2d:%06.3f", (Floor($ms / 3600000)), (Floor(Mod($ms,3600000) / 60000)), (Mod(Mod($ms,3600000),60000) / 1000))1 point
-
How To Get A Users Full Name
AnonymousX reacted to Jos for a topic
Beta required: $oMyError = ObjEvent("AutoIt.Error", "ComError") $UserObj = ObjGet("WinNT://" & @LogonDomain & "/" & @UserName) If @error Then MsgBox(0, 'username', 'Error connecting to domain') Else MsgBox(0, 'username', $UserObj.FullName) EndIf $UserObj = "" $oMyError = ObjEvent("AutoIt.Error", "") ;COM Error function Func ComError() If IsObj($oMyError) Then $HexNumber = Hex($oMyError.number, 8) SetError($HexNumber) Else SetError(1) EndIf Return 0 EndFunc ;==>ComError1 point