Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/19/2012 in all areas

  1. JohnOne

    Glitch in Send command?

    Here is your original code in a more structured way, will help you to learn further of what you already know. WinWaitActive("Order Text to Print on Order.") ;wait for the correct window to pop up Switch MsgBox(4, "Which Supplier?", "Is it other than Exp or CZ?") ;primary elimination Case 6 _Do_This_1() Case 7 Switch MsgBox(4, "Which Supplier?", "Is it Express?") ; secondary elimination Case 6 ; if it is express fabrications, then fill the window with info below _Do_This_2() Case 7 ;info to fill if the order is going to CZ _Do_This_3() EndSwitch EndSwitch Func _Do_This_1() Sleep(200) Send(".") Sleep(200) Send("{DOWN}") Sleep(200) Send(".") Sleep(200) Send("{DOWN}") Sleep(200) Send(".") Sleep(200) Send("{DOWN}") Sleep(200) Send("Daniel Tyrkiel") Send("{DOWN}") Send("01252 89 3363") EndFunc ;==>_Do_This_1 Func _Do_This_2() WinActivate("Order Text to Print on Order.") WinWaitActive("Order Text to Print on Order.") Sleep(200) Send(".") Send("{DOWN}") $var3 = InputBox("Input Works Order Number", "Input works order and customer") ; prompt for bespoke info WinActivate("Order Text to Print on Order.") WinWaitActive("Order Text to Print on Order.") Sleep(1000) Send($var3) Send("{DOWN}") Sleep(200) Send(".") Send("{DOWN}") Send("Daniel Tyrkiel") Send("{DOWN}") Send("01252 89 3363") EndFunc ;==>_Do_This_2 Func _Do_This_3() WinActivate("Order Text to Print on Order.") WinWaitActive("Order Text to Print on Order.") Sleep(200) Send(".") Send("{DOWN}") $var3 = InputBox("Input Works Order Number", "Input works order and week of completion") ; prompt for bespoke info WinActivate("Order Text to Print on Order.") WinWaitActive("Order Text to Print on Order.") Sleep(1000) Send($var3) Send("{DOWN}") Send(".") Send("{DOWN}") Send("Daniel Tyrkiel") Send("{DOWN}") Send("01252 89 3363") EndFunc ;==>_Do_This_3
    1 point
  2. The preprocessor converts out constant values. ; Before Local Const $iValue = 10 MsgBox(4096, '', $iValue) ; After MsgBox(4096, '', 10) ; Replaces $iValue with the respective value.
    1 point
  3. then you would need a third medium like a Ini file or a db3 file or a normal txt file with time/date so that you could compare it and execute the function as per your needs ;For INIFiles Use IniRead() IniWrite() ;For Text Files use FileWrite() FileRead() ;For db3 files use ;If you Dont have idea of how to use it ;try the Database UDF http://www.autoitscript.com/forum/topic/140521-database-udf/ _SQLite_Exec() Regards Phoenix XL
    1 point
  4. yup, You have to return the Value of the Procedure orelse it wont work. This should work GUICreate('Subclass Test - Phoenix XL', 450, 200) GUICtrlCreateInput('Hello world!', 10, 45, 250, 20) $TextBox = GUICtrlGetHandle(-1) GUISetState() $hHandle = DllCallbackGetPtr(DllCallbackRegister('MY_SUBCLASSPROC', 'LRESULT', 'HWND;UINT;WPARAM;LPARAM;UINT_PTR;DWORD_PTR')) If ($hHandle == 0) Then MsgBox(16, 'Subclass Test', 'Call to DllCallbackRegister failed.') Exit EndIf SetWindowSubclass($TextBox, $hHandle, 0, 0) If (@error) Then MsgBox(16, 'Subclass Test', 'Call to SetWindowSubclass failed.') Exit EndIf While (True) Switch (GUIGetMsg()) Case -3 ;GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd RemoveWindowSubclass($TextBox, $hHandle, 0, 0) Exit Func MY_SUBCLASSPROC($hWnd, $uMsg, $wParam, $lParam, $uIdSubclass, $dwRefData) ConsoleWrite($uMsg & @CRLF) Return DefSubclassProc($hWnd, $uMsg, $wParam, $lParam) EndFunc Func SetWindowSubclass($hWnd, $pfnSubclass, $uIdSubclass, $dwRefData) Local $bResult = DllCall('Comctl32.dll', 'BOOL', 'SetWindowSubclass', _ 'HWND', $hWnd, _ 'ptr', $pfnSubclass, _ 'UINT_PTR', $uIdSubclass, _ 'DWORD_PTR', $dwRefData) If (@error) Or ($bResult[0] == 0) Then Return SetError(1, 0, 0) Return SetError(0, 0, 1) EndFunc Func GetWindowSubclass($hWnd, $pfnSubclass, $uIdSubclass, ByRef $dwRefData) Local $bResult = DllCall('Comctl32.dll', 'BOOL', 'GetWindowSubclass', _ 'HWND', $hWnd, _ 'ptr', $pfnSubclass, _ 'UINT_PTR', $uIdSubclass, _ 'DWORD_PTR*', 0) If (@error) Or ($bResult[0] == 0) Then Return SetError(1, 0, 0) $dwRefData = $bResult[4] Return SetError(0, 0, 1) EndFunc Func RemoveWindowSubclass($hWnd, $pfnSubclass, $uIdSubclass, $dwRefData) Local $bResult = DllCall('Comctl32.dll', 'BOOL', 'RemoveWindowSubclass', _ 'HWND', $hWnd, _ 'ptr', $pfnSubclass, _ 'UINT_PTR', $uIdSubclass) If (@error) Or ($bResult[0] == 0) Then Return SetError(1, 0, 0) Return SetError(0, 0, 1) EndFunc Func DefSubclassProc($hWnd, $uMsg, $wParam, $lParam) Local $aRet=DllCall('Comctl32.dll', 'LRESULT', 'DefSubclassProc', _ 'HWND', $hWnd, _ 'UINT', $uMsg, _ 'WPARAM', $wParam, _ 'LPARAM', $lParam) Return $aRet[0] EndFunc
    1 point
  5. The registry needs to be updated? Never heard of.
    1 point
  6. This is a project that I'd like to see the end result of
    1 point
×
×
  • Create New...