Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/14/2024 in all areas

  1. CYCho

    ITaskbarList4 interface

    Cheating with a good intention!
    1 point
  2. ioa747

    ITaskbarList4 interface

    by cheating ? Func RefreshThumbnailPreview($hWnd) ; if window is minimized If _WinAPI_IsIconic($hWnd) Then WinSetTrans($hWnd, "", 0) GUISetState(@SW_RESTORE) Sleep(100) GUISetState(@SW_MINIMIZE) WinSetTrans($hWnd, "", 255) EndIf EndFunc
    1 point
  3. ioa747

    ITaskbarList4 interface

    I did some tests but I didn't succeed. It needs further research. If I find anything I will let you know
    1 point
  4. Dan_555

    Shell command hide

    The code for shell execute is: ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] ) To use the showflag, you have to provide blank parameters ... ShellExecute ( "filename" , "" , "" , "" , @SW_HIDE )
    1 point
  5. UEZ

    DllCall problem

    Maybe there are some dependencies missing (exports) for libpq.dll WS2_32.dll libintl-9.dll Secur32.dll WLDAP32.dll libssl-3-x64.dll libcrypto-3-x64.dll KERNEL32.dll SHELL32.dll ADVAPI32.dll VCRUNTIME140.dll api-ms-win-crt-heap-l1-1-0.dll api-ms-win-crt-convert-l1-1-0.dll api-ms-win-crt-string-l1-1-0.dll api-ms-win-crt-stdio-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0.dll api-ms-win-crt-environment-l1-1-0.dll api-ms-win-crt-time-l1-1-0.dll api-ms-win-crt-utility-l1-1-0.dll api-ms-win-crt-math-l1-1-0.dll api-ms-win-crt-locale-l1-1-0.dll api-ms-win-crt-filesystem-l1-1-0.dll because DllOpen(@ScriptDir & "\libpq.dll") returns -1 which is not ok.
    1 point
  6. Test case 1: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "click", Default, Default, Default, Default, Default) still works as expected: _WD_ElementActionEx ==> Success [0] : Parameters:    Element=5dcf7067-6c2f-4c1e-9d02-f00f85a7878e    Command=click    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=Default    ScrollView=Default Test case 2: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "modifierclick", Default, Default, Default, Default, Default) now works as expected (before it gave _WD_ElementActionEx ==> Invalid argument [5] :): _WD_ElementActionEx ==> Success [0] : Parameters:    Element=30faff28-a81d-4493-b8ac-0b6723b99cbd    Command=modifierclick    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=Default    ScrollView=Default Test case 3: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "modifierclick", Default, Default, Default, Default, "\ue009") now works as expected (before it gave _WD_ElementActionEx ==> Invalid argument [5] :): _WD_ElementActionEx ==> Success [0] : Parameters:    Element=f191c5d2-d6dd-492f-8023-8fd25dd4ae4d    Command=MODIFIERCLICK    XOffset=Default    YOffset=Default    Button=Default    HoldDelay=Default    Modifier=\ue009    ScrollView=Default Additionally, I can confirm that using: _WD_ElementActionEx($sSession, $sElement_btnAssetLookup, "modifierclick", Default, Default, Default, Default, "\ue009") to CONTROL-CLICK the search button on that page causes the resulting page to be displayed in a new tab rather than the default behavior of opening in a new window. So, this appears to have fixed the problem for me. Thank you Danp2 for maintaining au3WebDriver in general and for correcting this. Much appreciated!!
    1 point
  7. Here is an example how to translate error message: #include <Array.au3> #include <WinApi.au3> #include <MsgBoxConstants.au3> If $IDYES = MsgBox($MB_YESNO, 'Make a decision', 'Do you want to inercept error ?') Then AddHookApi("user32.dll", "MessageBoxW", "Intercept_MessageBoxW", "int", "hwnd;wstr;wstr;uint") EndIf _Example() Func _Example() ;~ _ErrorTranslator(Default) ; check your translation ; Let's try it ; Usual message box MsgBox(0, 'Test', 'Some text') ; Cause error that would say some AutoIt shit happened, but now it wouldn't say "AutoIt" DllStructCreate("byte[123456789097]") ; The End EndFunc ;==>_Example ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Intercept_MessageBoxW($hWnd, $sText, $sTitle, $iType) Local $aCall = DllCall("user32.dll", "int", "MessageBoxW", _ "hwnd", $hWnd, _ "wstr", _ErrorTranslator($sText), _ "wstr", StringReplace($sTitle, "AutoIt", 'Error occured in ' & @ScriptName), _ "uint", $iType) If @error Or Not $aCall[0] Then Return 0 Return $aCall[0] EndFunc ;==>Intercept_MessageBoxW ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; The magic is down below Func AddHookApi($sModuleName, $vFunctionName, $vNewFunction, $sRet = "", $sParams = "") Local Static $pImportDirectory, $hInstance Local Const $IMAGE_DIRECTORY_ENTRY_IMPORT = 1 If Not $pImportDirectory Then $hInstance = _WinAPI_GetModuleHandle(0) $pImportDirectory = ImageDirectoryEntryToData($hInstance, $IMAGE_DIRECTORY_ENTRY_IMPORT) If @error Then Return SetError(1, 0, 0) EndIf Local $iIsInt = IsInt($vFunctionName) Local $iRestore = Not IsString($vNewFunction) Local $tIMAGE_IMPORT_MODULE_DIRECTORY Local $pDirectoryOffset = $pImportDirectory Local $tModuleName Local $iInitialOffset, $iInitialOffset2 Local $iOffset2 Local $tBufferOffset2, $iBufferOffset2 Local $tBuffer, $tFunctionOffset, $pOld, $fMatch, $pModuleName, $pFuncName Local Const $PAGE_READWRITE = 0x04 While 1 $tIMAGE_IMPORT_MODULE_DIRECTORY = DllStructCreate("dword RVAOriginalFirstThunk;" & _ "dword TimeDateStamp;" & _ "dword ForwarderChain;" & _ "dword RVAModuleName;" & _ "dword RVAFirstThunk", _ $pDirectoryOffset) If Not DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAFirstThunk") Then ExitLoop $pModuleName = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAModuleName") $tModuleName = DllStructCreate("char Name[" & _WinAPI_StringLenA($pModuleName) & "]", $pModuleName) If DllStructGetData($tModuleName, "Name") = $sModuleName Then ; function from this module $iInitialOffset = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAFirstThunk") $iInitialOffset2 = $hInstance + DllStructGetData($tIMAGE_IMPORT_MODULE_DIRECTORY, "RVAOriginalFirstThunk") If $iInitialOffset2 = $hInstance Then $iInitialOffset2 = $iInitialOffset $iOffset2 = 0 While 1 $tBufferOffset2 = DllStructCreate("dword_ptr", $iInitialOffset2 + $iOffset2) $iBufferOffset2 = DllStructGetData($tBufferOffset2, 1) If Not $iBufferOffset2 Then ExitLoop If $iIsInt Then If BitAND($iBufferOffset2, 0xFFFFFF) = $vFunctionName Then $fMatch = True ; wanted function Else $pFuncName = $hInstance + $iBufferOffset2 + 2 ; 2 is size od "word", see line below... $tBuffer = DllStructCreate("word Ordinal; char Name[" & _WinAPI_StringLenA($pFuncName) & "]", $hInstance + $iBufferOffset2) If DllStructGetData($tBuffer, "Name") == $vFunctionName Then $fMatch = True ; wanted function EndIf If $fMatch Then $tFunctionOffset = DllStructCreate("ptr", $iInitialOffset + $iOffset2) VirtualProtect(DllStructGetPtr($tFunctionOffset), DllStructGetSize($tFunctionOffset), $PAGE_READWRITE) If @error Then Return SetError(3, 0, 0) $pOld = DllStructGetData($tFunctionOffset, 1) If $iRestore Then DllStructSetData($tFunctionOffset, 1, $vNewFunction) Else DllStructSetData($tFunctionOffset, 1, DllCallbackGetPtr(DllCallbackRegister($vNewFunction, $sRet, $sParams))) EndIf Return $pOld EndIf $iOffset2 += DllStructGetSize($tBufferOffset2) WEnd ExitLoop EndIf $pDirectoryOffset += 20 ; size of $tIMAGE_IMPORT_MODULE_DIRECTORY WEnd Return SetError(4, 0, 0) EndFunc ;==>AddHookApi Func VirtualProtect($pAddress, $iSize, $iProtection) Local $aCall = DllCall("kernel32.dll", "bool", "VirtualProtect", "ptr", $pAddress, "dword_ptr", $iSize, "dword", $iProtection, "dword*", 0) If @error Or Not $aCall[0] Then Return SetError(1, 0, 0) Return 1 EndFunc ;==>VirtualProtect Func ImageDirectoryEntryToData($hInstance, $iDirectoryEntry) ; Get pointer to data Local $pPointer = $hInstance ; Start processing passed binary data. 'Reading' PE format follows. Local $tIMAGE_DOS_HEADER = DllStructCreate("char Magic[2];" & _ "word BytesOnLastPage;" & _ "word Pages;" & _ "word Relocations;" & _ "word SizeofHeader;" & _ "word MinimumExtra;" & _ "word MaximumExtra;" & _ "word SS;" & _ "word SP;" & _ "word Checksum;" & _ "word IP;" & _ "word CS;" & _ "word Relocation;" & _ "word Overlay;" & _ "char Reserved[8];" & _ "word OEMIdentifier;" & _ "word OEMInformation;" & _ "char Reserved2[20];" & _ "dword AddressOfNewExeHeader", _ $pPointer) Local $sMagic = DllStructGetData($tIMAGE_DOS_HEADER, "Magic") ; Check if it's valid format If Not ($sMagic == "MZ") Then Return SetError(1, 0, 0) ; MS-DOS header missing. Btw 'MZ' are the initials of Mark Zbikowski in case you didn't know. ; Move pointer $pPointer += DllStructGetData($tIMAGE_DOS_HEADER, "AddressOfNewExeHeader") ; move to PE file header ; In place of IMAGE_NT_SIGNATURE structure Local $tIMAGE_NT_SIGNATURE = DllStructCreate("dword Signature", $pPointer) ; Check signature If DllStructGetData($tIMAGE_NT_SIGNATURE, "Signature") <> 17744 Then ; IMAGE_NT_SIGNATURE Return SetError(2, 0, 0) ; wrong signature. For PE image should be "PE\0\0" or 17744 dword. EndIf ; Move pointer $pPointer += 4 ; size of $tIMAGE_NT_SIGNATURE structure ; In place of IMAGE_FILE_HEADER structure ; Move pointer $pPointer += 20 ; size of $tIMAGE_FILE_HEADER structure ; Determine the type Local $tMagic = DllStructCreate("word Magic;", $pPointer) Local $iMagic = DllStructGetData($tMagic, 1) Local $tIMAGE_OPTIONAL_HEADER If $iMagic = 267 Then ; x86 version ; Move pointer $pPointer += 96 ; size of $tIMAGE_OPTIONAL_HEADER ElseIf $iMagic = 523 Then ; x64 version ; Move pointer $pPointer += 112 ; size of $tIMAGE_OPTIONAL_HEADER Else Return SetError(3, 0, 0) ; unsupported module type EndIf ; Validate input by checking available number of structures that are in the module Local Const $IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16 ; predefined value that PE modules always use (AutoIt certainly) If $iDirectoryEntry > $IMAGE_NUMBEROF_DIRECTORY_ENTRIES - 1 Then Return SetError(4, 0, 0) ; invalid input ; Calculate the offset to wanted entry (every entry is 8 bytes) $pPointer += 8 * $iDirectoryEntry ; At place of correst directory entry Local $tIMAGE_DIRECTORY_ENTRY = DllStructCreate("dword VirtualAddress; dword Size", $pPointer) ; Collect data Local $pAddress = DllStructGetData($tIMAGE_DIRECTORY_ENTRY, "VirtualAddress") If $pAddress = 0 Then Return SetError(5, 0, 0) ; invalid input ; $pAddress is RVA, add it to base address Return $hInstance + $pAddress EndFunc ;==>ImageDirectoryEntryToData Func _ErrorTranslator($sText = Default) Local Static $aErrorMessages = _ [ _ [ _ "(Paused) ", _ "" _ ], _ [ _ "AutoIt Error", _ "" _ ], _ [ _ "AutoIt has detected the stack has become corrupt.\n\nStack corruption typically occurs when either the wrong calling convention is used or when the function is called with the wrong number of arguments.\n\nAutoIt supports the __stdcall (WINAPI) and __cdecl calling conventions. The __stdcall (WINAPI) convention is used by default but __cdecl can be used instead. See the DllCall() documentation for details on changing the calling convention.", _ "" _ ], _ [ _ """EndWith"" missing ""With"".", _ "" _ ], _ [ _ "Badly formatted ""Func"" statement.", _ "" _ ], _ [ _ """With"" missing ""EndWith"".", _ "" _ ], _ [ _ "Missing right bracket ')' in expression.", _ "" _ ], _ [ _ "Missing operator in expression.", _ "" _ ], _ [ _ "Unbalanced brackets in expression.", _ "" _ ], _ [ _ "Error in expression.", _ "" _ ], _ [ _ "Error parsing function call.", _ "" _ ], _ [ _ "Incorrect number of parameters in function call.", _ "" _ ], _ [ _ """ReDim"" used without an array variable.", _ "" _ ], _ [ _ "Illegal text at the end of statement (one statement per line).", _ "" _ ], _ [ _ """If"" statement has no matching ""EndIf"" statement.", _ "" _ ], _ [ _ """Else"" statement with no matching ""If"" statement.", _ "" _ ], _ [ _ """EndIf"" statement with no matching ""If"" statement.", _ "" _ ], _ [ _ "Too many ""Else"" statements for matching ""If"" statement.", _ "" _ ], _ [ _ """While"" statement has no matching ""Wend"" statement.", _ "" _ ], _ [ _ """Wend"" statement with no matching ""While"" statement.", _ "" _ ], _ [ _ "Variable used without being declared.", _ "" _ ], _ [ _ "Array variable has incorrect number of subscripts or subscript dimension range exceeded.", _ "" _ ], _ [ _ "Variable subscript badly formatted.", _ "" _ ], _ [ _ "Subscript used on non-accessible variable.", _ "" _ ], _ [ _ "Too many subscripts used for an array.", _ "" _ ], _ [ _ "Missing subscript dimensions in ""Dim"" statement.", _ "" _ ], _ [ _ "No variable given for ""Dim"", ""Local"", ""Global"", ""Struct"" or ""Const"" statement.", _ "" _ ], _ [ _ "Expected a ""="" operator in assignment statement.", _ "" _ ], _ [ _ "Invalid keyword at the start of this line.", _ "" _ ], _ [ _ "Array maximum size exceeded.", _ "" _ ], _ [ _ """Func"" statement has no matching ""EndFunc"".", _ "" _ ], _ [ _ "Duplicate function name.", _ "" _ ], _ [ _ "Unknown function name.", _ "" _ ], _ [ _ "Unknown macro.", _ "" _ ], _ [ _ "Unable to get a list of running processes.", _ "" _ ], _ [ _ "Invalid element in a DllStruct.", _ "" _ ], _ [ _ "Unknown option or bad parameter specified.", _ "" _ ], _ [ _ "Unable to load the internet libraries.", _ "" _ ], _ [ _ """Struct"" statement has no matching ""EndStruct"".", _ "" _ ], _ [ _ "Unable to open file, the maximum number of open files has been exceeded.", _ "" _ ], _ [ _ """ContinueLoop"" statement with no matching ""While"", ""Do"" or ""For"" statement.", _ "" _ ], _ [ _ "Invalid file filter given.", _ "" _ ], _ [ _ "Expected a variable in user function call.", _ "" _ ], _ [ _ """Do"" statement has no matching ""Until"" statement.", _ "" _ ], _ [ _ """Until"" statement with no matching ""Do"" statement.", _ "" _ ], _ [ _ """For"" statement is badly formatted.", _ "" _ ], _ [ _ """Next"" statement with no matching ""For"" statement.", _ "" _ ], _ [ _ """ExitLoop/ContinueLoop"" statements only valid from inside a For/Do/While loop.", _ "" _ ], _ [ _ """For"" statement has no matching ""Next"" statement.", _ "" _ ], _ [ _ """Case"" statement with no matching ""Select""or ""Switch"" statement.", _ "" _ ], _ [ _ """EndSelect"" statement with no matching ""Select"" statement.", _ "" _ ], _ [ _ "Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.", _ "" _ ], _ [ _ "Cannot make existing variables static.", _ "" _ ], _ [ _ "Cannot make static variables into regular variables.", _ "" _ ], _ [ _ "Badly formated Enum statement", _ "" _ ], _ [ _ "This keyword cannot be used after a ""Then"" keyword.", _ "" _ ], _ [ _ """Select"" statement is missing ""EndSelect"" or ""Case"" statement.", _ "" _ ], _ [ _ """If"" statements must have a ""Then"" keyword.", _ "" _ ], _ [ _ "Badly formated Struct statement.", _ "" _ ], _ [ _ "Cannot assign values to constants.", _ "" _ ], _ [ _ "Cannot make existing variables into constants.", _ "" _ ], _ [ _ "Only Object-type variables allowed in a ""With"" statement.", _ "" _ ], _ [ _ """long_ptr"", ""int_ptr"" and ""short_ptr"" DllCall() types have been deprecated. Use ""long*"", ""int*"" and ""short*"" instead.", _ "" _ ], _ [ _ "Object referenced outside a ""With"" statement.", _ "" _ ], _ [ _ "Nested ""With"" statements are not allowed.", _ "" _ ], _ [ _ "Variable must be of type ""Object"".", _ "" _ ], _ [ _ "The requested action with this object has failed.", _ "" _ ], _ [ _ "Variable appears more than once in function declaration.", _ "" _ ], _ [ _ "ReDim array can not be initialized in this manner.", _ "" _ ], _ [ _ "An array variable can not be used in this manner.", _ "" _ ], _ [ _ "Can not redeclare a constant.", _ "" _ ], _ [ _ "Can not redeclare a parameter inside a user function.", _ "" _ ], _ [ _ "Can pass constants by reference only to parameters with ""Const"" keyword.", _ "" _ ], _ [ _ "Can not initialize a variable with itself.", _ "" _ ], _ [ _ "Incorrect way to use this parameter.", _ "" _ ], _ [ _ """EndSwitch"" statement with no matching ""Switch"" statement.", _ "" _ ], _ [ _ """Switch"" statement is missing ""EndSwitch"" or ""Case"" statement.", _ "" _ ], _ [ _ """ContinueCase"" statement with no matching ""Select""or ""Switch"" statement.", _ "" _ ], _ [ _ "Assert Failed!", _ "" _ ], _ [ _ "Obsolete function/parameter.", _ "" _ ], _ [ _ "Invalid Exitcode (reserved for AutoIt internal use).", _ "" _ ], _ [ _ "Variable cannot be accessed in this manner.", _ "" _ ], _ [ _ "Func reassign not allowed.", _ "" _ ], _ [ _ "Func reassign on global level not allowed.", _ "" _ ], _ [ _ "Unable to parse line.", _ "" _ ], _ [ _ "Unable to open the script file.", _ "" _ ], _ [ _ "String missing closing quote.", _ "" _ ], _ [ _ "Badly formated variable or macro.", _ "" _ ], _ [ _ "Missing separator character after keyword.", _ "" _ ], _ [ _ "Error allocating memory.", _ "Błąd allokacji pamięci." _ ] _ ] Local Static $aErrorMessages2 = _ [ _ ["(Paused) ", ""], _ ["AutoIt Error", ""], _ ["AutoIt has detected the stack has become corrupt.\n\nStack corruption typically occurs when either the wrong calling convention is used or when the function is called with the wrong number of arguments.\n\nAutoIt supports the __stdcall (WINAPI) and __cdecl calling conventions. The __stdcall (WINAPI) convention is used by default but __cdecl can be used instead. See the DllCall() documentation for details on changing the calling convention.", ""], _ ["""EndWith"" missing ""With"".", ""], _ ["Badly formatted ""Func"" statement.", ""], _ ["""With"" missing ""EndWith"".", ""], _ ["Missing right bracket ')' in expression.", ""], _ ["Missing operator in expression.", ""], _ ["Unbalanced brackets in expression.", ""], _ ["Error in expression.", ""], _ ["Error parsing function call.", ""], _ ["Incorrect number of parameters in function call.", ""], _ ["""ReDim"" used without an array variable.", ""], _ ["Illegal text at the end of statement (one statement per line).", ""], _ ["""If"" statement has no matching ""EndIf"" statement.", ""], _ ["""Else"" statement with no matching ""If"" statement.", ""], _ ["""EndIf"" statement with no matching ""If"" statement.", ""], _ ["Too many ""Else"" statements for matching ""If"" statement.", ""], _ ["""While"" statement has no matching ""Wend"" statement.", ""], _ ["""Wend"" statement with no matching ""While"" statement.", ""], _ ["Variable used without being declared.", ""], _ ["Array variable has incorrect number of subscripts or subscript dimension range exceeded.", ""], _ ["Variable subscript badly formatted.", ""], _ ["Subscript used on non-accessible variable.", ""], _ ["Too many subscripts used for an array.", ""], _ ["Missing subscript dimensions in ""Dim"" statement.", ""], _ ["No variable given for ""Dim"", ""Local"", ""Global"", ""Struct"" or ""Const"" statement.", ""], _ ["Expected a ""="" operator in assignment statement.", ""], _ ["Invalid keyword at the start of this line.", ""], _ ["Array maximum size exceeded.", ""], _ ["""Func"" statement has no matching ""EndFunc"".", ""], _ ["Duplicate function name.", ""], _ ["Unknown function name.", ""], _ ["Unknown macro.", ""], _ ["Unable to get a list of running processes.", ""], _ ["Invalid element in a DllStruct.", ""], _ ["Unknown option or bad parameter specified.", ""], _ ["Unable to load the internet libraries.", ""], _ ["""Struct"" statement has no matching ""EndStruct"".", ""], _ ["Unable to open file, the maximum number of open files has been exceeded.", ""], _ ["""ContinueLoop"" statement with no matching ""While"", ""Do"" or ""For"" statement.", ""], _ ["Invalid file filter given.", ""], _ ["Expected a variable in user function call.", ""], _ ["""Do"" statement has no matching ""Until"" statement.", ""], _ ["""Until"" statement with no matching ""Do"" statement.", ""], _ ["""For"" statement is badly formatted.", ""], _ ["""Next"" statement with no matching ""For"" statement.", ""], _ ["""ExitLoop/ContinueLoop"" statements only valid from inside a For/Do/While loop.", ""], _ ["""For"" statement has no matching ""Next"" statement.", ""], _ ["""Case"" statement with no matching ""Select""or ""Switch"" statement.", ""], _ ["""EndSelect"" statement with no matching ""Select"" statement.", ""], _ ["Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.", ""], _ ["Cannot make existing variables static.", ""], _ ["Cannot make static variables into regular variables.", ""], _ ["Badly formated Enum statement", ""], _ ["This keyword cannot be used after a ""Then"" keyword.", ""], _ ["""Select"" statement is missing ""EndSelect"" or ""Case"" statement.", ""], _ ["""If"" statements must have a ""Then"" keyword.", ""], _ ["Badly formated Struct statement.", ""], _ ["Cannot assign values to constants.", ""], _ ["Cannot make existing variables into constants.", ""], _ ["Only Object-type variables allowed in a ""With"" statement.", ""], _ ["""long_ptr"", ""int_ptr"" and ""short_ptr"" DllCall() types have been deprecated. Use ""long*"", ""int*"" and ""short*"" instead.", ""], _ ["Object referenced outside a ""With"" statement.", ""], _ ["Nested ""With"" statements are not allowed.", ""], _ ["Variable must be of type ""Object"".", ""], _ ["The requested action with this object has failed.", ""], _ ["Variable appears more than once in function declaration.", ""], _ ["ReDim array can not be initialized in this manner.", ""], _ ["An array variable can not be used in this manner.", ""], _ ["Can not redeclare a constant.", ""], _ ["Can not redeclare a parameter inside a user function.", ""], _ ["Can pass constants by reference only to parameters with ""Const"" keyword.", ""], _ ["Can not initialize a variable with itself.", ""], _ ["Incorrect way to use this parameter.", ""], _ ["""EndSwitch"" statement with no matching ""Switch"" statement.", ""], _ ["""Switch"" statement is missing ""EndSwitch"" or ""Case"" statement.", ""], _ ["""ContinueCase"" statement with no matching ""Select""or ""Switch"" statement.", ""], _ ["Assert Failed!", ""], _ ["Obsolete function/parameter.", ""], _ ["Invalid Exitcode (reserved for AutoIt internal use).", ""], _ ["Variable cannot be accessed in this manner.", ""], _ ["Func reassign not allowed.", ""], _ ["Func reassign on global level not allowed.", ""], _ ["Unable to parse line.", ""], _ ["Unable to open the script file.", ""], _ ["String missing closing quote.", ""], _ ["Badly formated variable or macro.", ""], _ ["Missing separator character after keyword.", ""], _ ["Error allocating memory.", "Błąd allokacji pamięci."] _ ] ConsoleWrite("! $sText= " & $sText & @CRLF) For $iError_idx = 0 To UBound($aErrorMessages) - 1 If $aErrorMessages[$iError_idx][0] = $sText Then $sText = $aErrorMessages[$iError_idx][1] EndIf Next If Not @Compiled And $sText = Default Then _ArrayDisplay($aErrorMessages) If Not @Compiled And $sText = Default Then _ArrayDisplay($aErrorMessages2) Return $sText EndFunc ;==>_ErrorTranslator
    1 point
  8. The whole browser is a control, and could be used for instance with controlsend or controlclick. With IE a non active window $hwnd = WinActivate("Google - Windows Internet Explorer") If Not IsHWnd($hwnd) Then MsgBox(0,0,"Fail") Exit EndIf Sleep(1000) WinSetState($hwnd,"",@SW_MINIMIZE) Sleep(1000) ControlSend($hwnd,"","[CLASS:Internet Explorer_Server; INSTANCE:1]","Search String") Sleep(1000) WinSetState($hwnd,"",@SW_MAXIMIZE) Will minimize it, send string, maximize. If the title was Mozilla Firefox and control ID were changed to "[CLASS:MozillaWindowClass; INSTANCE:2]" the same would occur. But just not any more, with this new gecko control and its broken a fair few of my scripts
    1 point
×
×
  • Create New...