ohgod Posted April 16, 2008 Share Posted April 16, 2008 _GUICtrlSlider_Create($hWnd, $iX, $iY[, $iWidth = 100[, $iHeight = 20[, $iStyle = 0x0001[, $iExStyle = 0x00000000]]]]) Can't figure out what are these for: $TBS_REVERSED - Smaller number indicates "higher" and a larger number indicates "lower" $TBS_DOWNISLEFT - Down equal left and up equal right All I want to see is a vertical slider with 0 for the bottom and 100 at the top (the default has 0 on the top 100 at the bottom) with a realtime tooltip, and all thin in oneventmode. I was able to reverse the slide with negative values but can't adjust the tooltip according to that (it shows the negative values). WM_NOTIFY escapes me. Link to comment Share on other sites More sharing options...
Aceguy Posted April 18, 2008 Share Posted April 18, 2008 (edited) Hope this helps. expandcollapse popup#include <GuiConstants.au3> ;Global Const $WM_HSCROLL = 0x0114 ;Global Const $WM_VSCROLL = 0x0115 $Gui = GuiCreate("Slider Update Demo", 250, 200) GUIRegisterMsg($WM_HSCROLL, "WM_HVSCROLL") GUIRegisterMsg($WM_VSCROLL, "WM_HVSCROLL") $Vertical_Label = GUICtrlCreateLabel("Vertical Slider Read: 0", 20, 20, 200) $Horizontal_Label = GUICtrlCreateLabel("Horizontal Slider Read: 0", 80, 120, 200) $Vertical_Slider = GUICtrlCreateSlider(20, 50, 30, 120,BitOr($GUI_SS_DEFAULT_SLIDER, $TBS_VERT)) GUICtrlSetData($Vertical_Slider,100) $Horizontal_Slider = GUICtrlCreateSlider(60, 150, 160, 30) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit EndSwitch WEnd Func WM_HVSCROLL($hWndGUI, $MsgID, $WParam, $LParam) Switch $LParam Case GUICtrlGetHandle($Vertical_Slider) $Vertical_val=100-GUICtrlRead($Vertical_Slider) ConsoleWrite($Vertical_val&@LF) GUICtrlSetData($Vertical_Label, "Vertical Slider Read: " & $Vertical_val) Case GUICtrlGetHandle($Horizontal_Slider) GUICtrlSetData($Horizontal_Label, "Horizontal Slider Read: " & GUICtrlRead($Horizontal_Slider)) EndSwitch EndFunc Edited April 18, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
JailDoctor Posted August 21, 2008 Share Posted August 21, 2008 This only works if you press F5 not Alt+F5 So it is for the release version, not the Beta version. Link to comment Share on other sites More sharing options...
theholycow Posted August 23, 2008 Share Posted August 23, 2008 When I try to run the script, I get that undeclared variable error* for $GUI_SS_DEFAULT_SLIDER in line 17. I think I'm probably missing something here, but I definitely don't see it declared in the script either... *(Error: Variable used without being declared.) Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
dbzfanatic Posted August 23, 2008 Share Posted August 23, 2008 When I try to run the script, I get that undeclared variable error* for $GUI_SS_DEFAULT_SLIDER in line 17. I think I'm probably missing something here, but I definitely don't see it declared in the script either... *(Error: Variable used without being declared.) You may need to add one or all of these. #include <GUIConstantsEX.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
theholycow Posted August 24, 2008 Share Posted August 24, 2008 Hmm, no I copied them all in exactly as they were on here and I get the same error... Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
theholycow Posted August 25, 2008 Share Posted August 25, 2008 bump Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
BrettF Posted August 25, 2008 Share Posted August 25, 2008 (edited) He didn't mean you may, he meant you will need those includeds for the script to work. So using the above code that Aceguy posted, add the following to the top. Should then work.#include <GUIConstantsEX.au3> #include <WindowsConstants.au3> #include <SliderConstants.au3>CheersBrettQuick Edit- Remove the existing include. Edited August 25, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
theholycow Posted August 25, 2008 Share Posted August 25, 2008 yes, I've done that, I'm still trying to run the code with those in it and I get the same error message Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 25, 2008 Share Posted August 25, 2008 yes, I've done that, I'm still trying to run the code with those in it and I get the same error messageYou must bo doing something really stupid in that case because the variable is in SliderConstants.au3 exactly as Brett stated. Open SciTe and go to "search>find in files" and search your includes directory and see for yourself. And btw why did't you do that in the beginning? That would have taken far less time than to post at the forum.... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
theholycow Posted August 25, 2008 Share Posted August 25, 2008 Got it, thanks. And... I didn't use it before because I didn't even know I could. I'm a little green at this. Thanks Christianity: In the beginning, there was God, who always was there and created everything.Atheism: In the beginning, there was nothing, which exploded. Both sides look bad... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 25, 2008 Share Posted August 25, 2008 Got it, thanks. And... I didn't use it before because I didn't even know I could. I'm a little green at this. ThanksNo worries mate, you will learn this kind of stuff over time..... hopefully .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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