Share this post

Link to post

Share on other sites

AdmiralAlkex 117

AdmiralAlkex 117

I changed the script to use the IAppVisibility API to detect Metro instead of the previous kludge. Now also detects Metro apps and not just the Start screen. I don't think I mentioned that limitation before. Oops!

Does not jump to a lower resolution while in Metro (by default). Metro copes with resolution changes by closing all applications. Very annoying.

I have not done any work on supporting multiple monitors, but it kinda works as long as the internal display is the "main" one.

Share this post

Link to post

Share on other sites

BrendonKoz 0

BrendonKoz 0

Having issues pushing PC images on Windows 8.1 that are completely refusing to retain resolution and desktop icon layout from the original image for some reason. Until we can figure out why, this is a great temporary solution for at least the resolution issue (which we can run as a batch job). Thank you for sharing this code!

Sign in

Similar Content

I will put it as simple as possible
Why this code runs perfectly on 32bit and it fails on 64bit?
Local $hWND = WinGetProcess("[CLASS:LSS_app]")
ConsoleWrite($hWND & @LF)
Local $hModuleList = _WinAPI_EnumProcessModules($hWND)
If @error Then ConsoleWrite("Error: " & @error & @LF)
For $i = 0 To $hModuleList[0][0] - 1
;~ If StringInStr($hModuleList[$i][1], "sysCap64.dll") Then
ConsoleWrite($hModuleList[$i][0] & @LF)
;~ EndIf
Next
As the title says EnumProcessModules returns error 10 which I have no clue what it is.
It must be something with autoit or my lack of coding because a similar code in C# will work like a charm on both x86 and x64
Process[] Processes = Process.GetProcessesByName("winLSS64Cap");
Process nProcess = Processes[0];
Handle = OpenProcess(0x10, true, (uint)nProcess.Id);
for(int i = 0; i < nProcess.Modules.Count; i++)
{
Console.WriteLine(nProcess.Modules[i].ModuleName);
}

I want to switch from Windows 7 to Windows 8.1 ( x86 ) but I still want to code in AutoIt. Now I saw in the Description file that is only compatible upto Windows 7, but will it work also on 8 ? And yes Im referring to the latest Autoit version available !

I basically want to create a Windows 8 Training script for new users, so need a popup to show when they open the start menu.
WinWait and WinWaitActive are never detecting on my Win8 64 bit computer when waiting for the new start screen window.
I have used "Start menu" and "[CLASS:ImmersiveLauncher]" for the title, even "[CLASS:DirectUIHWND]"
Below is the Window info the the Start Screen
>>>> Window <<<<
Title: Start menu
Class: ImmersiveLauncher
Position: 1920, 0
Size: 1920, 1080
Style: 0x96000000
ExStyle: 0x00200008
Handle: 0x0000000000010190
>>>> Control <<<<
Class: DirectUIHWND
Instance: 0
ClassnameNN: DirectUIHWND0
Name:
Advanced (Class): [CLASS:DirectUIHWND; INSTANCE:0]
ID:
Text:
Position: 0, 0
Size: 1920, 1080
ControlClick Coords: 138, 174
Style: 0x56000000
ExStyle: 0x00000000
Handle: 0x0000000000010192
>>>> Mouse <<<<
Position: 2058, 174
Cursor ID: 0
Color: 0x180053
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
>>>> Hidden Text <<<<
Explorer Browser Control
I have this setup to run as a test when I press a hotkey:
$title = WinGetTitle ("[ACTIVE]")
$state = WinGetState ($title)
ConsoleWrite ($title &" "& $state)
I get "Start menu 0" its always 0 no matter what (it works correctly with other programs)
I can get the PID of start menu but how can I then check when its active from that?
Any help appreciated
EDIT: I can only get the PID, Handle or anything else if the Start window is open. I cannot use win wait with any of this info though.

This is my function to put round brackets "()" around a selected text:
HotKeySet("^+9", "Encl")
While 1
Sleep(10000)
WEnd
Func Encl()
ClipPut("")
Send( "^x" )
Sleep(200)
local $ClipEncl = ClipGet()
Switch @HotKeyPressed
Case "^+9"
$ClipEncl = '(' & $ClipEncl & ')'
EndSwitch
ClipPut($ClipEncl )
Send("^v")
EndFunc
The problem is that many times the ctrl or shift or ctrl-shift key is stuck after I invoke the above hotkey
and I have to push the ctrl, shift or both keys again to be able to use these as before.
Does anyone know what I did wrong in this function?