
senthor
Active Members-
Posts
66 -
Joined
-
Last visited
Everything posted by senthor
-
another function: Func _iTunes_Mute() $iTunesApp.Mute = String(not $iTunesApp.Mute) EndFunc
-
Of course he did, but I got absolutely no information. A few things would've been enough- I asked for them- but instead I only got commetaries about not reading the help file.
-
OK, I got it. If you don't want to help me, stop it. Because I have tried all you say, I have compared examples and I changed them. But if you don't want to help, then I'm sorry for posting a question in a "Help and Support" forum. Thanks, I'll try my best in other communities. EDIT: Those friendly guys of the German autoit community were so kind to help me, and now I can understanding what I did wrong. This is the example: Global Const $VSCLASS_TAB = "TAB" Global Const $TABP_TABITEM = 1 Global Const $TABP_TABITEMLEFTEDGE = 2 Global Const $TABP_TABITEMRIGHTEDGE = 3 Global Const $TABP_TABITEMBOTHEDGE = 4 Global Const $TABP_TOPTABITEM = 5 Global Const $TABP_TOPTABITEMLEFTEDGE = 6 Global Const $TABP_TOPTABITEMRIGHTEDGE = 7 Global Const $TABP_TOPTABITEMBOTHEDGE = 8 Global Const $TABP_PANE = 9 Global Const $TABP_BODY = 10 Global Const $TABP_AEROWIZARDBODY = 11 Global Const $TMT_COLOR = 204 Global Const $TMT_FILLCOLOR = 3802 Global Const $TMT_FILLCOLORHINT = 0x0EED $hWnd = GUICtrlGetHandle($tab); Handle of the Tabcontrol $hTheme = DllCall("uxTheme.dll", "ptr", "OpenThemeData", "hwnd", $hWnd, "wstr", $VSCLASS_TAB) $hTheme = $hTheme[0] $COLORREF = DllCall("uxTheme.dll", "lresult", "GetThemeColor", "ptr", $hTheme, "int", $TABP_PANE, "int", 0 , "int", $TMT_FILLCOLOR, "dword*", 0) $COLORREF = $COLORREF[5] $RGB = _BGR2RGB($COLORREF) DllCall("uxTheme.dll","lresult","CloseThemeData","ptr", $hTheme) Func _BGR2RGB($iColor) Return Number(String(BinaryMid(Binary($iColor),1,3))) EndFunc Consts found here
-
Sorry, I read the help file, studied some examples and I used msdn. But I just don't get it, sorry! This is the newest version I have: $classes = WinGetClassList("[CLASS:AutoIt v3 GUI;TITLE:ModMan]") $struct = DllStructCreate("COLORREF") $struct2 = DllStructCreate("str") DllStructSetData($struct2, 1, $classes) $htheme = DllCall("uxtheme.dll", "none", "OpenThemeData", "hwnd", $gui, "ptr", DllStructGetPtr($struct2)) $color = DllCall("uxtheme.dll", "int:COLORREF", "GetThemeColor", "HTHEME", $htheme, "int", "TABP_BODY", "int", "", "int", "TMT_COLOR") DllCall("uxtheme.dll", "none", "CloseThemeData", "hwnd", $htheme) The problem is that I have never really worked with structs before and I don't know what kind of data a COLORREF structure is, etc! So please help me, I just can't do it alone.
-
Why don't you try GUICtrlCreateTreeView with TreeViewItems with checkboy-style?
-
OK, I found something... Need help to translate. GetThemeColor function in uxtheme.dll, see here. Somebody can help plz? Til now I have: ($gui is the handle to the gui) $htheme = DllCall("uxtheme.dll", "int:hwnd", "OpenThemeData", "hwnd", $gui, "str", "TABP_BODY") $color = DllCall("uxtheme.dll", "int:COLORREF", "GetThemeColor", "HTHEME", $htheme, "int", "TABP_BODY", "int", "", "int", "TMT_COLOR") DllCall("uxtheme.dll", "int:hwnd", "CloseThemeData", "hwnd", $htheme)
-
Hi! I'm currently trying to create a GUI like this one: Found in this thread. Now, I want the slider to have the same background color as the tab control. How to do that? I actually tried PixelGetColor(), it works but needs some millisecs. And I didn't figure it out how to use _WinAPI_GetSysColor(). The tab control bgcolor shouldn't change, it should be system default. Thanks!
-
GUI Glitches (maybe tab related?)
senthor replied to LuigiMario's topic in AutoIt GUI Help and Support
Anyone any idea? 'Cause I got Vista problems with sliders and tabs now... -
Small example... It connects iTunes with the windows media keys on keyboard and wmc remote. #NoTrayIcon #RequireAdmin global $HKstate = false Global $iTunesApp Global $Library_Tracks Global $file Global $path _iTunes_Start() HotKeySet("{MEDIA_STOP}", "SwitchHK") SwitchHK() While 1 Sleep(100) WEnd Func SwitchHK() If _IsPressed(23) then Exit If not $HKstate Then HotKeySet("{MEDIA_NEXT}", "_iTunes_Next") HotKeySet("{MEDIA_PREV}", "_iTunes_Prev") HotKeySet("{MEDIA_PLAY_PAUSE}", "_iTunes_Play_Pause") HotKeySet("{VOLUME_DOWN}", "_iTunes_Vol_Down") HotKeySet("{VOLUME_UP}", "_iTunes_Vol_Up") $HKstate = true ElseIf $HKstate Then HotKeySet("{MEDIA_NEXT}") HotKeySet("{MEDIA_PREV}") HotKeySet("{MEDIA_PLAY_PAUSE}") HotKeySet("{VOLUME_DOWN}") HotKeySet("{VOLUME_UP}") $HKstate = false EndIf return $HKstate EndFunc Func _iTunes_Start() $iTunesApp = ObjCreate("iTunes.Application") $Library_Playlist = $iTunesApp.LibraryPlaylist $Library_Tracks = $iTunesApp.LibraryPlaylist.Tracks $sel_Track = $iTunesApp.SelectedTracks $current_Track = $iTunesApp.CurrentTrack $Player_State = $iTunesApp.PlayerState $Playlist_Handle = $iTunesApp.LibrarySource.Playlists EndFunc ;==>_iTunes_Start Func _iTunes_Vol_Up($vol_percent = 1) $iTunesApp.SoundVolume = $iTunesApp.SoundVolume + $vol_percent EndFunc ;==>_iTunes_Vol_Up Func _iTunes_Vol_Down($vol_percent = 1) $iTunesApp.SoundVolume = $iTunesApp.SoundVolume - $vol_percent EndFunc ;==>_iTunes_Vol_Down Func _iTunes_Prev() $iTunesApp.PreviousTrack EndFunc ;==>_iTunes_Prev Func _iTunes_Next() $iTunesApp.NextTrack EndFunc ;==>_iTunes_Next Func _iTunes_Play_Pause() $iTunesApp.PlayPause EndFunc ;==>_iTunes_Play_Pause Func _IsPressed($sHexKey, $vDLL = 'user32.dll') ; $hexKey must be the value of one of the keys. ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is. Local $a_R = DllCall($vDLL, "int", "GetAsyncKeyState", "int", '0x' & $sHexKey) If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1 Return 0 EndFunc ;==>_IsPressed Just press the play/pause, next, previous oder vol up/down buttons to sww how it works. With the stop-button you can de/activate the tool, when you press "End" and stop it will be closed. senthor
-
OMG. All the work for nothing Thx
-
The hole code partly translated is: func iTunes($command) $muc_piT := ObjCreate( "{DC0C2640-1415-4644-875C-6F4D769839BA}", "{9DD6680B-3EDC-40DB-A771-E6FE4832E34A}" ) DllCall( VTable( $muc_piT, $command ), "Uint", $muc_piT ) $muc_piT = 0 EndFunc Func VTable($ppv, $idx) Return CoDecodeInteger(CoDecodeInteger($ppv) + $idx * 4) EndFunc Func CoDecodeInteger($ptr) Return *$ptr | *++$ptr << 8 | *++$ptr << 16 | *++$ptr << 24 EndFuncBut I don't get the $muc_piT := ObjCreate, and you have to help me a little... $command is a number between 0 and 19.
-
Hi! I'm currently trying to create a tool to control iTunes with the windows media keyboard functions. I found a pretty good source, but it's written in Autohotkey. And this is the first thing I just can#t get translated... CoDecodeInteger(ptr) { Return *ptr | *++ptr << 8 | *++ptr << 16 | *++ptr << 24 } I got it like this: Func CoDecodeInteger($ptr) Return *$ptr OR *++$ptr << 8 OR *++$ptr << 16 OR *++$ptr << 24 EndFunc I jsut don't get these "*", "*++" and "<<" operators! Thanks!
-
Hi all! I want to create a GUI with full or particular Vista Bk color, as known f.ex. from the background of the play-controls in Media Player. Is there any possibility? Maybe someone has asked this before, but I didn't find... Thanks! senthor
-
GUI Glitches (maybe tab related?)
senthor replied to LuigiMario's topic in AutoIt GUI Help and Support
OK, I tried the following: By PixelGetColor I receive the color of the surrounding tab and then I can use it with GUICtrlSetBkColor. But for about 1/10 s it has the wrong color... -
Not working for me. Autoit.exe error report or memory errors. And a "compressed" 1KB file is 35KB.
-
GUI Glitches (maybe tab related?)
senthor replied to LuigiMario's topic in AutoIt GUI Help and Support
But the real problem is: How to make those stupid sliders have the same color as the tab control? -
Same problem. I'm currently creating a tool where security is very important because passwords will be saved. To get them safe, I wrote my one multiplex md5 randomizing _StringEncrypt function, but if everyone can get the code for it it's not very secure. So please, your example file "w0uter-protected script.exe" works with the cracked decompiler too. Can't you just improve your tool so that it works? Or make a tutorial how to use your genius work ??? Thanx, senthor
-
Error with creating pics in a gui
senthor replied to senthor's topic in AutoIt General Help and Support
Everything clear now! I used a msstyle which caused the problem. -
Error with creating pics in a gui
senthor replied to senthor's topic in AutoIt General Help and Support
OK, that's a problem. Cause the program is actually 2993 lines. I copied only the gui to a new script, but the error doesn't occurs there. -
Error with creating pics in a gui
senthor replied to senthor's topic in AutoIt General Help and Support
I tried that already. Nothing changed. I made all pixels 1,1 0xFF00FF, but it didn't work. -
Error with creating pics in a gui
senthor replied to senthor's topic in AutoIt General Help and Support
really nobody?? Then you can close... -
Error with creating pics in a gui
senthor replied to senthor's topic in AutoIt General Help and Support
nobody has any idea? Plz, it has to work properly! -
You didn't set a resizing, so the ctrls are moved. #include <GUIConstantsEx.au3> $window = GUICreate('GUI', 200, 100) $button = GUICtrlCreateButton('click', 50, 50) GUICtrlSetResizing(-1, 802) $button2 = GUICtrlCreateButton('button', 250, 50) GUICtrlSetResizing(-1, 802) GUISetState() Global $state = False While 1 $msg = GUIGetMsg() If $msg = $button Then $state = Not $state If $state = True Then WinMove($window, '', Default, Default, 350) ElseIf $state = False Then WinMove($window, '', Default, Default, 200) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd
-
because the gui is 200 pix in width and the button starts at 250pix from left. You didn't set a resizing, so the ctrls are moved. #include <GUIConstantsEx.au3> $window = GUICreate('GUI', 200, 100) $button = GUICtrlCreateButton('click', 50, 50) GUICtrlSetResizing(-1, 802) $button2 = GUICtrlCreateButton('button', 250, 50) GUICtrlSetResizing(-1, 802) GUISetState() Global $state = False While 1 $msg = GUIGetMsg() If $msg = $button Then $state = Not $state If $state = True Then WinMove($window, '', Default, Default, 350) ElseIf $state = False Then WinMove($window, '', Default, Default, 200) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd
-
Hi everyone! I'm currently developing the next version of an already-launched program called gli modmanager, but I've a problem. I'm creating several pics in the gui, and the following failure happens: Parts of a picture become transparent, even if the window is NOT WS_EX_LAYERED AND no picture is created where the top-left pixel has the color being replaced. Here's a screenshot: On the left, you can see the pic in paint, right in the script. The colors being replaced are all about RGB 239,239,239 to 241,241,241. I just don't get it why. Plz help! Thanks EDIT: There's a grey background-image, so don't wonder about the strange color of the wrong area!