Search the Community
Showing results for tags 'win8'.
-
The original resolution switcher by HTC works good on earlier Windows, but has two problems on Win8. When activated it creates a window telling the current resolution. It is given focus and thus forces Metro back to the desktop.It switches between the native 800x480 and 1024x600 which is to low to run Metro apps.To fix this I started with a simple script that switches to 1152x864 with a window that displays the resolution without grabbing focus.Later I added some extras: Option to skip the window altogetherSeparate resolution in desktop and MetroA simple installer/uninstaller for the HTC Shift (or other devices that use a synaptics touchpad in the same matter, check the code).Code moved to attachment. See next post for screenshots. ResSwitch source.rar The .au3 itselfModified (removed duplicate const's)Modified (removed duplicate const's and commented WinXP (+ earlier) code to reduce file size)ResSwitch.rar (previous downloads: 51)A compiled .exe (if you don't have AutoIt? lol).bat file calling the installer/uninstaller function (optional).ini file containing the standard settings (optional)
-
Hello, I have a need to develop a software that will ultimately run on Windows 8 so I would like to know if anyone has tried to use AutoIT in Win8? Will sending of key strokes work properly in Win8? I don't have Win8 but the client is upgrading from Win7 to Win8 so this question? TIA Yogi Yang
-
[Solved] Win 8 and Shell_CharmWindow
CartoonDragon posted a topic in AutoIt General Help and Support
Hi Everyone, I hope someone is able to help me here, i want to detect the "Charm" windows in win8 in a hope to control them, but for now i can't even detect them as a window, does anyone know how i'd be able to detect the windows? specficly the window i want to detect is in win8 when you press "Winkey + I" My initial idea was simple, but doesn't work (tho it might get the wrong Charm window still nothing) WinWait("[Class:Shell_CharmWindow]") msgbox(0,"yey", "yey") So i went and tried with the name of the window, which in my case is "Indstillinger" Tho in english i'm guessing it's "Settings" WinWait("Settings") msgbox(0,"yey","yey") This of course did not work either. Ultimately what i want to do is to setup a Windows 8 none domain computer to a WPA2 Enterprise network with user credentials with out the user having to set this up manually. This we have done easily in windows XP, Vista and Win7 by using a "Wlan.exe" (Much like netsh, but for winxp as well) to import a wireless profile, this makes all the other windows pop up and promt for the user credentials, but windows 8 does not do this. Update ------------------------------- I've found a way to open the network window by sending a command, but still no way of detecting it. rundll32.exe %SystemRoot%\system32\van.dll, RunVAN -
I wanted to see if I could manage to use IAppVisibility (Win8) in one of my scripts. (it seems the name was changed in Release Preview but MSDN wasn't updated) It took some time but I learned to make tlb file and made definitions for GetAppVisibilityOnMonitor and IsLauncherVisible methods (working good as far as I can tell), but I would like Advise and Unadvise too if possible, but I don't know how... See definition on above link. Only example I found is some (too advanced for me to translate) c++ code. Here. But it compiles and runs fine at least. trancexx is doing a similar thing in maybe that can be used somehow? Anyone have a clue? Test script with the working funcs: #include <WinAPI.au3> ;=============================================================================== #interface "IAppVisibility" Global Const $sCLSID_AppVisibility = "{7E5FE3D9-985F-4908-91F9-EE19F9FD1514}" Global Const $sIID_IAppVisibility = "{2246EA2D-CAEA-4444-A3C4-6DE827E44313}" ; Definition Global Const $tagIAppVisibility = "GetAppVisibilityOnMonitor hresult(ptr;int*);" & _ "IsLauncherVisible hresult(int*);" & _ "Advise hresult(ptr;dword*);" & _ "Unadvise hresult(dword);" ;============================================================================== Local $oAppVisibility = ObjCreateInterface($sCLSID_AppVisibility, $sIID_IAppVisibility, $tagIAppVisibility) ;~ MsgBox(0, @ScriptName, IsObj($oAppVisibility)) ;~ ConsoleWrite(IsObj($oAppVisibility) & @CRLF) If Not IsObj($oAppVisibility) Then ConsoleWrite("NOT IsObj" & @LF) MsgBox(0, "", "NOT IsObj") Exit EndIf HotKeySet("ö", "_IsLauncherVisible") HotKeySet("å", "_GetAppVisibilityOnMonitor") $oMyError = ObjEvent("AutoIt.Error", "ErrFunc") ; Install a custom error handler $callback=DllCallbackRegister("_MonitorEnumProc","int","ptr;ptr;ptr;lparam") Global $Monitor DllCall("user32.dll","int","EnumDisplayMonitors","ptr",0,"ptr",0,"ptr",DllCallbackGetPtr($callback),"lparam",10) While 1 Sleep(1000) WEnd Func _IsLauncherVisible() Local $bVisible $iRet = $oAppVisibility.IsLauncherVisible($bVisible) ;~ If @error Then ;Enable this and disable AutoIt.Error if on Alpha ;~ MsgBox(0, @ScriptName, @error) ;~ EndIf ToolTip("1: " & $iRet & @CRLF & "2: " & $bVisible) EndFunc Func _GetAppVisibilityOnMonitor() Local $iMode $iRet = $oAppVisibility.GetAppVisibilityOnMonitor($Monitor, $iMode) ToolTip("1: " & $iRet & @CRLF & "2: " & $iMode) EndFunc ; This is a custom error handler Func ErrFunc() $HexNumber = Hex($oMyError.number, 8) MsgBox(0, "", "We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "WinDescription is: " & $oMyError.windescription) $iEventError = 1 ; Use to check when a COM Error occurs EndFunc ;==>ErrFunc Func _MonitorEnumProc($hMonitor, $hdcMonitor, $lprect, $lparam) MsgBox(0, "Monitor", "Monitor handle: " & $hMonitor & @CRLF & "LPARAM: " & $lparam) $Monitor = $hMonitor EndFunc Here's tlb stuff: ================================================================================== coclass AppVisibility; CLSID = {7E5FE3D9-985F-4908-91F9-EE19F9FD1514}; // Implemented interface: <Interface> IAppVisibility ================================================================================== Interface IAppVisibility; IID = {2246EA2D-CAEA-4444-A3C4-6DE827E44313}; // Inherits from: IUnknown {00000000-0000-0000-C000-000000000046} 1. STDCALL FUNC PUREVIRTUAL; HRESULT GetAppVisibilityOnMonitor( [in] hMonitor, [out] int* pMode ); 2. STDCALL FUNC PUREVIRTUAL; HRESULT IsLauncherVisible( [out] int* pfVisible ); 3. STDCALL FUNC PUREVIRTUAL; HRESULT Advise( [in] * pCallback, [out] dword* pdwCookie ); 4. STDCALL FUNC PUREVIRTUAL; HRESULT Unadvise( [in] dword dwCookie ); ================================================================================== enum MONITOR_APP_VISIBILITY; { MAV_UNKNOWN = 0, MAV_NO_APP_VISIBLE = 1, MAV_APP_VISIBLE = 2 }; ================================================================================== Interface IAppVisibilityEvents; IID = {6584CE6B-7D82-49C2-89C9-C6BC02BA8C38}; // Inherits from: IUnknown {00000000-0000-0000-C000-000000000046} 1. STDCALL FUNC PUREVIRTUAL; HRESULT AppVisibilityOnMonitorChanged( [in] hMonitor, [in] previousMode, [in] currentMode ); 2. STDCALL FUNC PUREVIRTUAL; HRESULT LauncherVisibilityChange( [in] int currentVisibleState ); ==================================================================================