Excenter Posted March 2, 2008 Share Posted March 2, 2008 (edited) Hello, send a GUICtrlSetData(...) command or GUICtrlSendMsg(...) to an external window (AutoIt3) for a progress control ($PBM_SETPOS) don't work but ControlMove(..) works. Here is the sourcecode: ;AutoItSetOption("WinTitleMatchMode", 4) ;$handle = WinGetHandle('classname=AutoIt v3 GUI') $ControlID=3 ControlMove("Batch progress", "", $ControlID, 10, 200); This works GUICtrlSetData ($ControlID,90); Don't work GUICtrlSendMsg( $ControlID, $PBM_SETPOS,20,0); Don't work Can anyone tell me howto set the position? Edited March 2, 2008 by Excenter Link to comment Share on other sites More sharing options...
martin Posted March 2, 2008 Share Posted March 2, 2008 Hello, send a GUICtrlSetData(...) command or GUICtrlSendMsg(...) to an external window (AutoIt3) for a progress control ($PBM_SETPOS) don't work but ControlMove(..) works. Here is the sourcecode: ;AutoItSetOption("WinTitleMatchMode", 4) ;$handle = WinGetHandle('classname=AutoIt v3 GUI') $ControlID=3 ControlMove("Batch progress", "", $ControlID, 10, 200); This works GUICtrlSetData ($ControlID,90); Don't work GUICtrlSendMsg( $ControlID, $PBM_SETPOS,20,0); Don't work Can anyone tell me howto set the position?The control ID is only usable in the gui that created it for ControlSendMessage AFAIK. To control a progress bar in another program you need to use _SendMessage and you need to know the handle for the control. Or you could send a message to the window for the app that has the progress bar and let that app control the progress bar if you are writing the other program. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Excenter Posted March 3, 2008 Author Share Posted March 3, 2008 Thank you! _SendMessage with a handle works: $hProgress = ControlGetHandle ( "Batch install", "", 3 ) _SendMessage($hProgress, $PBM_SETPOS,$CmdLine[$i+1],0) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now