kosamja Posted April 23, 2016 Share Posted April 23, 2016 (edited) Hi, can someone help me convert this autohotkey dllcall to autoit dllcall? Thanks in advance. ; WTNCA_NODRAWICON := 2 ; WTNCA_NOSYSMENU := 4 DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist(A), "int", 1, "int64*", 6 | 6<<32, "uint", 8) Edited April 23, 2016 by kosamja Link to comment Share on other sites More sharing options...
Danyfirex Posted April 23, 2016 Share Posted April 23, 2016 Hello. DllCall("UxTheme.dll","LONG","HWND",$YourHWND,"INT",$YourWINDOWTHEMEATTRIBUTETYPE,"ptr",$yourpvAttribute,"dword",$yourcbAttribute) Saludos MichaelHB and kosamja 2 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
kosamja Posted April 27, 2016 Author Share Posted April 27, 2016 (edited) Hi, thanks for answering but that doesnt remove titlebar icon like it does in autohotkey. Any other way for removing icon in titlebar of any window without also removing taskbar icon? Or could you tell me what are exact values for $YourWINDOWTHEMEATTRIBUTETYPE, $yourpvAttribute and $yourcbAttribute? Edited April 27, 2016 by kosamja Link to comment Share on other sites More sharing options...
JohnOne Posted April 27, 2016 Share Posted April 27, 2016 DllCall("UxTheme.dll","LONG", "SetWindowThemeAttribute", "HWND",$YourHWND,"INT",$YourWINDOWTHEMEATTRIBUTETYPE,"ptr",$yourpvAttribute,"dword",$yourcbAttribute) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Danyfirex Posted April 27, 2016 Share Posted April 27, 2016 Lol I forgot function name. thanks @JohnOne Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
kosamja Posted August 5, 2016 Author Share Posted August 5, 2016 On 4/23/2016 at 10:27 PM, kosamja said: ; WTNCA_NODRAWICON := 2 ; WTNCA_NOSYSMENU := 4 DllCall("uxtheme\SetWindowThemeAttribute", "ptr", WinExist(A), "int", 1, "int64*", 6 | 6<<32, "uint", 8) Still waiting for answer... Could anyone convert this dllcall to autoit so it will work when run. This is not answer: On 4/27/2016 at 6:07 PM, JohnOne said: DllCall("UxTheme.dll","LONG", "SetWindowThemeAttribute", "HWND",$YourHWND,"INT",$YourWINDOWTHEMEATTRIBUTETYPE,"ptr",$yourpvAttribute,"dword",$yourcbAttribute) Link to comment Share on other sites More sharing options...
Danyfirex Posted August 5, 2016 Share Posted August 5, 2016 Probably you want this. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ typedef struct WTA_OPTIONS { ;~ DWORD dwFlags; ;~ DWORD dwMask; ;~ } WTA_OPTIONS, *PWTA_OPTIONS; Global Const $WTNCA_NODRAWICON = 0x00000002 Global Const $WTNCA_NOSYSMENU = 0x00000004 Global Const $sTagWTA_OPTIONS = "dword dwFlags;dword dwMask;" #Region ### START Koda GUI section ### Form= Global $hGUI = GUICreate("GUI without Icon!!!", 316, 233, 192, 124) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $tWTA_OPTIONS = DllStructCreate($sTagWTA_OPTIONS) DllStructSetData($tWTA_OPTIONS, "dwFlags", BitOR($WTNCA_NODRAWICON, $WTNCA_NOSYSMENU)) DllStructSetData($tWTA_OPTIONS, "dwMask", BitOR($WTNCA_NODRAWICON, $WTNCA_NOSYSMENU)) DllCall("UxTheme.dll", "LONG", "SetWindowThemeAttribute", "HWND", $hGUI, "INT", 1, "ptr", DllStructGetPtr($tWTA_OPTIONS), "dword", DllStructGetSize($tWTA_OPTIONS)) ConsoleWrite(@error & @CRLF) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Saludos kosamja 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Developers Jos Posted August 5, 2016 Developers Share Posted August 5, 2016 2 hours ago, kosamja said: Still waiting for answer... Could anyone convert this dllcall to autoit so it will work when run. This is not answer It actually is answer and don't see too much wrong with it. Maybe you need to show who you implemented it in your script! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kosamja Posted August 5, 2016 Author Share Posted August 5, 2016 (edited) On 8/5/2016 at 3:56 PM, Danyfirex said: Probably you want this. Saludos Yes, thank you very much Danyfirex. On 8/5/2016 at 4:28 PM, Jos said: It actually is answer and don't see too much wrong with it. Maybe you need to show who you implemented it in your script! Jos I didnt implemented it in any way because I wasnt able to find any similar example on forum like example that Danyfirex written. expandcollapse popup; www.autoitscript.com/forum/topic/160944-how-to-check-if-gui-window-is-behind-other-window/ ; www.autoitscript.com/forum/topic/93315-detect-window-creation-using-callback-hook/ ; www.autoitscript.com/forum/topic/114628-capture-the-windows-events/ ; www.autoitscript.com/forum/topic/56536-easy-shell-hooking-example/?page=2 ; www.autoitscript.com/forum/topic/164207-capture-event-from-external-windows/ ; www.autoitscript.com/forum/topic/150274-how-can-i-detect-clicks-in-injected-system-menu/ ; www.autoitscript.com/forum/topic/182083-how-to-convert-this-autohotkey-dllcall-to-autoit-dllcall/ ; www.autoitscript.com/forum/topic/77905-sleep-down-to-100-nano-seconds/ #NoTrayIcon #include<WinAPI.au3> #include<WinAPISys.au3> Opt("WinWaitDelay", 0) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) Opt("MouseClickDragDelay", 0) Opt("SendKeyDelay", 0) Opt("SendKeyDownDelay", 0) Opt("WinTitleMatchMode", 3) Global Const $WS_POPUP = 0x80000000 Global Const $WTNCA_NODRAWCAPTION = 0x00000001 Global Const $WTNCA_NODRAWICON = 0x00000002 Global Const $WTNCA_NOSYSMENU = 0x00000004 Global Const $sTagWTA_OPTIONS = "dword dwFlags;dword dwMask;" Local $tWTA_OPTIONS = DllStructCreate($sTagWTA_OPTIONS) DllStructSetData($tWTA_OPTIONS, "dwFlags", BitOR($WTNCA_NODRAWCAPTION, $WTNCA_NODRAWICON, $WTNCA_NOSYSMENU)) DllStructSetData($tWTA_OPTIONS, "dwMask", BitOR($WTNCA_NODRAWCAPTION, $WTNCA_NODRAWICON, $WTNCA_NOSYSMENU)) Global $hGUI = GUICreate("", 0, 0, 0, 0, $WS_POPUP) GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), 'WM_SHELLHOOK') ; Define a window message and assign to the WM_SHELLHOOK function. _WinAPI_RegisterShellHookWindow($hGUI) ; Register the shell hook message to our GUI. $hHookFunc = DllCallbackRegister('_WinEventProc', 'none', 'ptr;uint;hwnd;int;int;uint;uint') $hWinHook = _WinAPI_SetWinEventHook($EVENT_SYSTEM_FOREGROUND, $EVENT_SYSTEM_DIALOGSTART, DllCallbackGetPtr($hHookFunc)) While 1 _HighPrecisionSleep(0.1) WEnd Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam) If $wParam = $HSHELL_REDRAW or $wParam = $HSHELL_WINDOWCREATED Then DllCall("UxTheme.dll", "LONG", "SetWindowThemeAttribute", "HWND", $lParam, "INT", 1, "ptr", DllStructGetPtr($tWTA_OPTIONS), "dword", DllStructGetSize($tWTA_OPTIONS)) EndFunc ;==>WM_SHELLHOOK Func _WinEventProc($hHook, $iEvent, $hWnd, $iObjectID, $iChildID, $iEventThread, $imsEventTime) If $iEvent = $EVENT_SYSTEM_FOREGROUND or $iEvent = $EVENT_SYSTEM_DIALOGSTART Then DllCall("UxTheme.dll", "LONG", "SetWindowThemeAttribute", "HWND", $hWnd, "INT", 1, "ptr", DllStructGetPtr($tWTA_OPTIONS), "dword", DllStructGetSize($tWTA_OPTIONS)) EndFunc Func _HighPrecisionSleep($iMicroSeconds,$hDll=False) Local $hStruct, $bLoaded If Not $hDll Then $hDll=DllOpen("ntdll.dll") $bLoaded=True EndIf $hStruct=DllStructCreate("int64 time;") DllStructSetData($hStruct,"time",-1*($iMicroSeconds*10)) DllCall($hDll,"dword","ZwDelayExecution","int",0,"ptr",DllStructGetPtr($hStruct)) If $bLoaded Then DllClose($hDll) EndFunc Edited August 7, 2016 by kosamja Link to comment Share on other sites More sharing options...
Bert Posted August 5, 2016 Share Posted August 5, 2016 uxtheme - I didn't know what it was until I saw this post. Very interesting! The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
kosamja Posted August 7, 2016 Author Share Posted August 7, 2016 (edited) Edit: solved Edited August 7, 2016 by kosamja 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