Jump to content

Recommended Posts

Posted (edited)

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.

Edited by badapple89
Posted

Hi there,

maybe this?

while 1
$state = WinActive("[CLASS:Shell_TrayWnd]")
sleep (50)
if $state = 0x000200B0 Then
    MsgBox(16, "test", "i hit start menu")
    Exit
EndIf
ConsoleWrite ($state & @CRLF)
wend

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted

Didn't work November, never get the msg box.

AdmiralClaws, I don't have time to look into that and the project is on the back burner now.

However for those following at home my solution was:
 

;LAUNCH START
Send ("{LWINDOWN}{LWINUP}")
;GET HANDLE
$winH = WinGetHandle ("[ACTIVE]")
;Clsoe Start
Send ("{LWINDOWN}{LWINUP}")

WinWaitActive ($winH)

And this DOES work.



Issue now is making the msg box/creating a gui that displays OVERTOP of the win8 start screen :(
Played around for a bit and nothing seemed to work (top attribute, show, popup window etc)
Project on hold though....for now


Thanks for the help.

Posted

Issue now is making the msg box/creating a gui that displays OVERTOP of the win8 start screen :(

Played around for a bit and nothing seemed to work (top attribute, show, popup window etc)

Project on hold though....for now

Thanks for the help.

To display on top of the start screen, your executable must have UIAccess="true" in the manifest.

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/8529357f-3ff8-4c83-baaf-5215ca9cc14a/desktop-apps-on-top-of-metro

Posted

Didn't work November, never get the msg box.

 

Hi there,

I just saw your input.

Instead of relaying in keystroke, try this new code. I think is more rebust.

$gethandle = WinGetHandle("[CLASS:Shell_TrayWnd]")


While 1
$state = WinActive("[CLASS:Shell_TrayWnd]")
Sleep(10)
If $state = $gethandle Then
MsgBox(16, "test", "I can do something now")
Exit
EndIf
WEnd

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted (edited)

Nooooope still doesn't trigger the msgbox.

Edit: Actually the msg box triggers when left or right clicking the task bar (not when start screen is showing or when clicking win 8.1 start button)

Tried to change class to immersive launcher and did not help

Edited by badapple89
Posted

Nooooope still doesn't trigger the msgbox.

Edit: Actually the msg box triggers when left or right clicking the task bar (not when start screen is showing or when clicking win 8.1 start button)

Tried to change class to immersive launcher and did not help

 

You are right my friend.

Please care to try this one please!

While 1
    Sleep(50)
    $hControl = ControlGetHandle("[CLASS:Shell_TrayWnd]", "", "Start")
    If $hControl = 0x00000000 Then
        Send("{ESCAPE}")
        MsgBox(16, "test", "I can do something now")
        Exit
    EndIf
Wend

It worked for me Win 8.1 64bits

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Posted

Noooope still nothing. Maybe as I have two screens? Also tried CLASS:DirectUIHWND as thats what I get in AU3tInfo but then it triggers as soon as its run - regardless of start menu open.

I don't really need this anymore though so will leave it for others to continue on with.

But thanks for the help!

Posted

Noooope still nothing. Maybe as I have two screens? Also tried CLASS:DirectUIHWND as thats what I get in AU3tInfo but then it triggers as soon as its run - regardless of start menu open.

I don't really need this anymore though so will leave it for others to continue on with.

But thanks for the help!

Hi again,

Strange, i am also using dual monitor and is working for me.

As soon as you click start button sends me a msgbox.

Well at least we tryed!!!  ;)

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...