Leaderboard
Popular Content
Showing content with the highest reputation on 01/24/2022 in all areas
-
In the output you posted, it's looking for the actual webdriver (msedgedriver.exe). Have you installed that in your working directory? You'll need to unblock the file. Details copied from here --1 point
-
Try this instead : #include <WinAPIConv.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> Run("Notepad.exe") OnAutoItExitRegister(OnAutoItExit) Global $hWnd = GUICreate("") GUIRegisterMsg($WM_HOTKEY, WM_HOTKEY) _WinAPI_RegisterHotKey($hWnd, 0x0144, 0, 0x44) ; d _WinAPI_RegisterHotKey($hWnd, 0x011B, 0, 0x1B) ; ESC While Sleep(500) WEnd Func WM_HOTKEY($hWnd, $iMsg, $wParam, $lParam) Switch _WinAPI_HiWord($lParam) Case 0x44 If WinActive("[CLASS:Notepad]") Then ConsoleWrite("D was pressed" & @CRLF) Else ConsoleWrite("sending d" & @CRLF) ControlSend("[ACTIVE]", "", "", "d") EndIf Case 0x1B Exit EndSwitch EndFunc ;==>WM_HOTKEY Func OnAutoItExit() _WinAPI_UnregisterHotKey($hWnd, 0x0144) _WinAPI_UnregisterHotKey($hWnd, 0x011B) EndFunc ;==>OnAutoItExit1 point
-
_FileDragDrop.au3 works for Notepad++ but not for Firefox
SOLVE-SMART reacted to mLipok for a topic
You should do one of the two things: 1. provide a way to put login/password by user to your program and thus to webpage. 2. open browser, display message to login manually, wait for login.... do the stuff. and where is the problem ? automate it tooo or: 2. open browser, display message to login manually, wait for login, wait for manually provided stuff .... do the automation stuff.1 point -
KaFu Hello Warning! In next verison, in file ICU - Icon Configuration Utility v6.au3 please add fix 1) Stroke 242-244 Before GUICtrlCreateListViewItem("|No Layouts saved", $c_Listview_Configs) GUICtrlSetState($c_Button_Restore, $GUI_DISABLE) GUICtrlSetState($c_Button_Delete, $GUI_DISABLE) After GUICtrlCreateListViewItem("|No Layouts saved", $c_Listview_Configs) GUICtrlSetState($c_Button_Restore, $GUI_DISABLE) GUICtrlSetState($c_Button_Delete, $GUI_DISABLE) GUICtrlSetState($c_Button_Duplicate, $GUI_DISABLE) 2) Stroke 837-841 Before ; Reset GUI GUICtrlSetData($c_Label_State, "Ready") GUICtrlSetBkColor($c_Label_State, $i_Color_LimeGreen) GUICtrlSetState($c_Button_Restore, $GUI_ENABLE) GUICtrlSetState($c_Button_Delete, $GUI_ENABLE) After GUICtrlSetData($c_Label_State, "Ready") GUICtrlSetBkColor($c_Label_State, $i_Color_LimeGreen) GUICtrlSetState($c_Button_Restore, $GUI_ENABLE) GUICtrlSetState($c_Button_Delete, $GUI_ENABLE) GUICtrlSetState($c_Button_Duplicate, $GUI_ENABLE) 3) Stroke 1119-1121 Before GUICtrlCreateListViewItem("|No Layouts saved", $c_Listview_Configs) GUICtrlSetState($c_Button_Restore, $GUI_DISABLE) GUICtrlSetState($c_Button_Delete, $GUI_DISABLE) After GUICtrlCreateListViewItem("|No Layouts saved", $c_Listview_Configs) GUICtrlSetState($c_Button_Restore, $GUI_DISABLE) GUICtrlSetState($c_Button_Delete, $GUI_DISABLE) GUICtrlSetState($c_Button_Duplicate, $GUI_DISABLE) Without this fix, button Duplicate not correctly work (enable or disable button when not config "icf" files) Thank You!1 point
-
As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.1 point
-
I don't have the answer to your question, but I do know that there are a few guides for SciTE that give you instructions on setting up custom menu options But I am not making this whole post about advice that you already know, I am here to share my experience with an IDE/Editor for C. To start, I do not like the huge bulked up IDEs which come with a ton of features and also setup the compiler for you... no, I am not into those so I am not going to recommend them, but if you want to check them out there are plenty of options out there. I think the perfect balance between an IDE and just a plain text editor needs to be found, and I found that in Geany Geany is light-weight but also has support for all the basic features like code highlighting, auto-completion, options/buttons to run basic commands to build your code, and the most important feature: embedded terminal Geany natively supports C, so it supports the syntax etc. out of the box, and it even has handy options to switch between headers and source code. It also has an healthy set of plugins which can extend the editor, my favourite plugins are the project manager and git changebar. So I suggest you give it a try 👍1 point
-
This is a quick example I created in which it move the mouse after a certain period of time of being idle. I could have changed the system settings, but then this wasn't an option. #include <WinAPISys.au3> Global Const $IDLETIME_GUID = '5816AA22-EEB4-4C92-BB07-4A5E1DBA4A6A' Global Enum $IDLETIME_DELEGATE, $IDLETIME_ID, $IDLETIME_ISRUNNING, $IDLETIME_TIME, $IDLETIME_MAX Global $g_bIsRunning = True ; For the example only. This is set to false when ESC is pressed. HotKeySet('{ESC}', Close) Example() Func Example() Local $hIdle = _IdleTime(10000, WakeUp) ; Create an idle time object and set the time to move the mouse every 10 seconds and call the parameterless function WakeUp(). ConsoleWrite('IsRunning: ' & _IdleTime_IsRunning($hIdle) & @CRLF) ; Display running status. ConsoleWrite('Time: ' & _IdleTime_GetTime($hIdle) & @CRLF) _IdleTime_StopStartPause($hIdle) ; Start the idle time monitoring. ConsoleWrite('IsRunning: ' & _IdleTime_IsRunning($hIdle) & @CRLF) ; Display running status. While Sleep(250) And $g_bIsRunning WEnd If _IdleTime_IsRunning($hIdle) Then _IdleTime_StopStartPause($hIdle) ; Stop if the idle time is currently running. EndIf ConsoleWrite('IsRunning: ' & _IdleTime_IsRunning($hIdle) & @CRLF) Return True EndFunc ;==>Example Func Close() $g_bIsRunning = False EndFunc ;==>Close Func WakeUp() MsgBox($MB_SYSTEMMODAL, '', 'Please wake up!') EndFunc ;==>WakeUp #Region IdleTime UDF Func _IdleTime($iTime = Default, $hFunc = Default) Local $aIdleTime[$IDLETIME_MAX] $aIdleTime[$IDLETIME_ID] = $IDLETIME_GUID $aIdleTime[$IDLETIME_ISRUNNING] = False __IdleTime_Delegate($aIdleTime, $hFunc) ; Set the delegate function. This should have no parameters. __IdleTime_Time($aIdleTime, $iTime) ; Set the time. Return $aIdleTime EndFunc ;==>_IdleTime Func _IdleTime_GetDelegate(ByRef $aIdleTime) Return (__IdleTime_IsAPI($aIdleTime) ? $aIdleTime[$IDLETIME_DELEGATE] : Null) EndFunc ;==>_IdleTime_GetDelegate Func _IdleTime_GetTime(ByRef $aIdleTime) Return (__IdleTime_IsAPI($aIdleTime) ? $aIdleTime[$IDLETIME_TIME] : Null) EndFunc ;==>_IdleTime_GetTime Func _IdleTime_IsRunning(ByRef $aIdleTime) Return (__IdleTime_IsAPI($aIdleTime) ? $aIdleTime[$IDLETIME_ISRUNNING] : False) EndFunc ;==>_IdleTime_IsRunning Func _IdleTime_SetDelegate(ByRef $aIdleTime, $hFunc) Local $bReturn = False If __IdleTime_IsAPI($aIdleTime) And __IdleTime_Time($aIdleTime, $hFunc) Then ; Set the delegate. $bReturn = True If _IdleTime_IsRunning($aIdleTime) Then _IdleTime_StopStartPause($aIdleTime) ; Stop. _IdleTime_StopStartPause($aIdleTime) ; Start. EndIf EndIf Return $bReturn EndFunc ;==>_IdleTime_SetDelegate Func _IdleTime_SetTime(ByRef $aIdleTime, $iTime) Local $bReturn = False If __IdleTime_IsAPI($aIdleTime) And __IdleTime_Time($aIdleTime, $iTime) Then ; Set the time. $bReturn = True If _IdleTime_IsRunning($aIdleTime) Then _IdleTime_StopStartPause($aIdleTime) ; Stop. _IdleTime_StopStartPause($aIdleTime) ; Start. EndIf EndIf Return $bReturn EndFunc ;==>_IdleTime_SetTime Func _IdleTime_StopStartPause(ByRef $aIdleTime) Local $bReturn = False If __IdleTime_IsAPI($aIdleTime) Then $bReturn = True If $aIdleTime[$IDLETIME_ISRUNNING] Then __IdleTime_Proc(0, 0) ; Set the static variablse in the procedure to the default of zero, thus clearing the previous values. AdlibUnRegister(__IdleTime_AdLibRegister) Else __IdleTime_Proc($aIdleTime[$IDLETIME_DELEGATE], $aIdleTime[$IDLETIME_TIME]) ; Set the static variables in the procedure to the required time when to move the mouse and delegate to call. AdlibRegister(__IdleTime_AdLibRegister, Ceiling($aIdleTime[$IDLETIME_TIME] / 3)) ; Register the function to be called time / 3. EndIf $aIdleTime[$IDLETIME_ISRUNNING] = Not $aIdleTime[$IDLETIME_ISRUNNING] EndIf Return $bReturn EndFunc ;==>_IdleTime_StopStartPause Func __IdleTime_IsAPI(ByRef $aIdleTime) Return UBound($aIdleTime) = $IDLETIME_MAX And $aIdleTime[$IDLETIME_ID] = $IDLETIME_GUID EndFunc ;==>__IdleTime_IsAPI Func __IdleTime_AdLibRegister() ; Wrapper for __IdleTime_Proc(), since AdLibRegister() doesn't accept functions with parameters. Return __IdleTime_Proc() EndFunc ;==>__IdleTime_AdLibRegister Func __IdleTime_Delegate(ByRef $aIdleTime, $hFunc) If Not IsFunc($hFunc) Then $hFunc = 0 $aIdleTime[$IDLETIME_DELEGATE] = $hFunc Return True EndFunc ;==>__IdleTime_Delegate Func __IdleTime_Proc($hSetFunc = Default, $iSetTime = Default) Local Static $hFunc = 0, _ $iTime = 0 If $hSetFunc = Default And $iSetTime = Default And $iTime > 0 Then If _WinAPI_GetIdleTime() >= $iTime Then Local $aPos = MouseGetPos() If Not @error Then Local Enum $POS_X, $POS_Y MouseMove($aPos[$POS_X] + 1, $aPos[$POS_Y]) MouseMove($aPos[$POS_X], $aPos[$POS_Y]) If IsFunc($hFunc) Then ; Call a function if it's set. $hFunc() EndIf EndIf EndIf Else If Not ($hSetFunc = Default) Then $hFunc = $hSetFunc If Not ($iSetTime = Default) Then $iTime = $iSetTime EndIf Return True EndFunc ;==>__IdleTime_Proc Func __IdleTime_Time(ByRef $aIdleTime, $iTime) If $iTime = Default Or $iTime < 750 Then $iTime = 750 ; 750 ms by default, since the procedure is checked 750 / 3 = 250 (which is the minimum for AdLibRegister()). $aIdleTime[$IDLETIME_TIME] = $iTime Return True EndFunc ;==>__IdleTime_Time #EndRegion IdleTime UDF1 point