Jump to content

Recommended Posts

Posted

I wrote those to work with the GUI and Windows for Slider Controls "Trackbar"

here's the screen capture from the volume control

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Play Control

Class: Tray Volume

Size: X: 817    Y: 450    W: 81    H: 136

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 859 Y: 528

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x808080 Dec: 8421504

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:  X: 24    Y: 24    W: 30    H: 81

Control ID: 1001

ClassNameNN: msctls_trackbar321

Text: 

Style:  0x5001061A

ExStyle:  0x00000004

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Volume

&Mute

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

as you can see it has the msctls_trackbar321 control which is the same in the examples.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

Well first off: Woot for gafrost!

But is there any way to set sliders in other GUI's? Like say, the default Windows Volume Control (sndvol32.exe)?

<{POST_SNAPBACK}>

Maybe like this?

run("sndvol32.exe")
WinWait("Volume Control")
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGUP}")
sleep(1000)
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGUP}")
sleep(1000)
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGUP}")
sleep(1000)
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGDN}")
sleep(1000)
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGDN}")
sleep(1000)
ControlSend("Volume Control", "", "msctls_trackbar322", "{PGDN}")

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Posted

I wrote those to work with the GUI and Windows for Slider Controls "Trackbar"

here's the screen capture from the volume control

as you can see it has the msctls_trackbar321 control which is the same in the examples.

<{POST_SNAPBACK}>

Ah okay, sorry I just hadn't had the opportunity to grab the latest beta yet, so I didn't have a chance to test them. I just assumed that they were using AutoIt-GUI specific functions or something.
Posted

Your GuiSlider UDFs are missing one function, "GUICtrlSliderGetPos"

I guess for AutoIt-made GUI's, you don't need this, thanks to GuiCtrlRead. But for other sliders I don't believe there's a way to get their current value.

Global Const $TBM_GETPOS = $TWM_USER
Func _GUICtrlSliderGetPos($h_slider)
   Local $ret
   $ret = DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_slider, "int", $TBM_GETPOS, "int", 0, "int", 0)
   Return $ret[0]
EndFunc  ;==>_GUICtrlSliderGetPos

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...