Jump to content

TheWizEd

Active Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by TheWizEd

  1. Thanks to both of you. After snooping through all the Functions I did discover GUISwitch which I think will solve my problem. It seems AutoIt stores the value of the last window and control somewhere and that can be used to chain controls and data.
  2. How to add controls to a tab item dynamically? A tab has a set of common input controls but depending on a condition the controls following it vary. For example, if a condition is set the following may be a combobox and radio buttons. If the condition changes the combobox and radio go a way and are replaced with a checkbox and input control. I don't see any handle or control passed to tab or tab item.
  3. Haven't figured that out yet. I'm trying message loop instead.
  4. I'm trying to see if the user can move the control. But also want to know if the user just clicks the canvas.
  5. I want to capture the button click but I only get the canvas click. How do I get the button click? Global $hCanvas= GUICreate("Canvas", 500, 500) GUISetOnEvent($GUI_EVENT_PRIMARYDOWN,"CanvasClicked") GUISetState(@SW_SHOW) Local $idButton = GUICtrlCreateButton("hello",0,0,100,25) GUICtrlSetOnEvent(-1, "ButtonClicked")
  6. Look at UDF _IsPressed
  7. @mallory I'm able to enable iMacro in Chrome but haven't tested its capabilities. However it has a Record feature that shows all the clicks you've made. From there you can edit and replay.
  8. It seems AutoIt for Chrome is no longer working. It's not in Google Store so not able to enable. I can download the crx and drag to chrome but I can't figure out any way to enable the extension.
  9. @jdelaney Nope still no display. Command cut from here and pasted into my script. Local $sCommand = '"' & @AutoItExe & '" /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand( hwnd(' & $hWnd & '),'''', hwnd(' & $hControl & '),''SendComandID'',57601)"' From _CheckStatus, creates a log Success in Run varvame = $pId result = 12164 elapsed time = 6 Success in WinWaitActive varvame = $hWnd result = 0x000405AA elapsed time = 265 Success in ControlGetHandle varvame = $hControl result = 0x000405E8 elapsed time = 1 Success in Run varvame = $vResult result = 13036
  10. So I tried several different way but nothing seems to work. _CheckStatus just checks @error and return value from function call as well as time to execute command. #include <MsgBoxConstants.au3> #include <Timers.au3> #include <Array.au3> #include "UtilLibrary.au3" Local $iStartTime = _Timer_Init() Local $pId = Run("C:\Program Files (x86)\Equis\The DownLoader\Dlwin.exe") ; $pId is a handle value _CheckStatus("Run","$pId",$pId,@error,@extended,$iStartTime) $iStartTime = _Timer_Init() Local $hWnd = WinWaitActive("The DownLoader","",10) ; $hWnd is a handle value _CheckStatus("WinWaitActive","$hWnd",$hWnd,@error,@extended,$iStartTime) $iStartTime = _Timer_Init() Local $hControl = ControlGetHandle($hWnd,"",59394) ; $hControl is a handle value _CheckStatus("ControlGetHandle","$hControl",$hControl,@error,@extended,$iStartTime) ; Open file from toolbar $iStartTime = _Timer_Init() Local $sCommand = @AutoItExe & ' /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand( hwnd(' & $hWnd & '),'''', hwnd(' & $hControl & '),''SendComandID'',57601)"' ;Local $sCommand = @AutoItExe & ' /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand( hwnd(' & $hWnd & '),'''',59394,''SendComandID'',57601)"' ;Local $sCommand = @AutoItExe & ' /ErrorStdOut /AutoIt3ExecuteLine "ControlCommand( hwnd(' & $hWnd & '),'''',''[ID:59394]'',''SendComandID'',57601)"' MsgBox($MB_SYSTEMMODAL, "",$sCommand) Local $vResult = Run($sCommand) _CheckStatus("Run","$vResult",$vResult,@error,@extended) ; $vResult is an integer number
  11. @jdelaney so I tried your suggetion of Run but now it doesn't open. Back to T&E of what the parameters should be.
  12. @OldGuyWalking & @jdelaney first I'm not using Scite, I use Notepad++ for everything I do. second, if using ControlCommand is so complicated there should be more examples to document how its used. Searching the wiki and forum doesn't turn up much. I was finally able to automate my task using a series of keystroke. Send(...)s to achieve my objective. A bunch of {ALT}s. But wanted to figure out how to use the applications toolbar. That's when I got in trouble. OldGuy, yes, I developed my own utility to monitor incremental progress because I was't aware of the _Debug UDFs. Both of you thanks for your help.
  13. jdelaney, try as i might i can't find anything that talks about multiple process. I've tried this forum, the wiki, the functions and UDFs. Can you point me to something that may shed some light on this subject.
  14. ControlCommand works and a dialog box with title "Open" appears. My interpretation of WinWait is to make sure the dialog has opened. What do you mean by and how do I start a second process?
  15. I'm still trying to understand what some of these commands do. What's wrong with the following code excerpt. ; Open file from toolbar $iStartTime = _Timer_Init() Local $vResult = ControlCommand($hWnd,"",59394,"SendCommandID",57601) MsgBox($MB_SYSTEMMODAL, "",_Timer_Diff($iStartTime)) ; Open dialog appears but the next command doesn't see it $iStartTime = _Timer_Init() $vResult = WinWait("Open","",10) MsgBox($MB_SYSTEMMODAL, "",_Timer_Diff($iStartTime)) ; MsgBox appears 10 seconds after I close Open file dialog
  16. Thanks. The docs and change log are misleading. I was searching change log for mention of map and it implies maps are available 3.3.14.0 #2502. Luckily I found example of using Scripting.Dictionary.
  17. 3.3.14.3
  18. Thanks for all the advise. It took a while but I think i've figured out arrays. Now how about maps. I get error "Variable subscript badly formatted" at []. Local $mTest[] $mTest["one"] = 1 $mTest["two"] = 2 $mTest["three"] = 3
  19. How do I work with 2D arrays. I've tried this but get errors. Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]] ;$aTest[0][] = [10,11,12] ; Error at [] Local $sTest = "" For $i = 0 To UBound($aTest)-1 Local $aExtract = _ArrayExtract($aTest,$i,$i) $sTest = $sTest & MyTest($aExtract) Next Func MyTest($aTemp) _ArrayDisplay($aTemp) ; Error at v $aTemp Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF EndFunc
  20. Success. But it seems this is trial and error try ControlClick, try WinMenuSelectItem, try Send.
  21. By accelerator I'm assuming you mean &File and so on. I did try accelerators but those didn't work either.
  22. Still nothing.
  23. I can't get the menu items, but I tried some of the notepad examples and same thing. I can get Commad ID of a toolbar but can't simulate click.
  24. How do I do that?
×
×
  • Create New...