Hi Guyz
i created a Dummy gui for a very complex Security information event managment system.
basically , the system has rules / etc which are triggerd on certain events , in order to let pepole know about the events it emails but also - user intervention is needed in order to create a CASE / Ticket in a ticketing system.
after a case is created it will be handled by the rightful owners
so i basically created mouse / click / keyboard events and recorded it , and on certain resolution and certain settings - the program works great.
However
i was asked to do the following - which i dont know
make the GUI window - always on top
and "hide" the window tasks (Close/Minimize/Maximize) , so the only way to close the program will be right click on the program and choose close
here is the code - will anyone help me to do so ?
thanks
Code:
WinSet,AlwaysOnTop,Toggle
Gui, Add, Button, x6 y17 w80 h30, פתח קריאה
Gui, Add, Button, x96 y17 w80 h30 , סגור קריאה
Gui, Add, Button, x186 y17 w80 h30 , KB
Gui, Add, Button, x86 y67 w100 h30 , פתח מערכת
Gui, Show, x293 y293 h103 w295, SimSoc - CA Service Desk - 08'
Return
Buttonפתחקריאה:
WinWait, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
IfWinNotActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010., , WinActivate, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
WinWaitActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
Send, {CTRLDOWN}2{CTRLUP}
; MouseClick, left, 496, 67
Sleep, 800
MouseClick, left, 400, 602
Sleep, 800
MouseClick, right, 400, 602
Sleep, 800
MouseClick, left, 445, 659
Sleep, 800
MouseClick, right, 186, 168
Sleep, 800
MouseClick, left, 292, 357
Sleep, 800
MouseClick, left, 55, 138
Sleep, 800
MouseClick, left, 596, 201
Sleep, 800
Send, {CTRLDOWN}v{CTRLUP}
MouseClick, left, 78, 116
Sleep, 800
MouseClick, left, 213, 454
Sleep, 800
MouseClick, right, 213, 454
Sleep, 800
MouseClick, left, 198, 452
Sleep, 800
MouseClick, right, 198, 452
Sleep, 800
MouseClick, left, 245, 517
Sleep, 800
MouseClick, left, 157, 114
Sleep, 800
MouseClick, left, 928, 205
Sleep, 800
Send, {END}{END}{SPACE}{CTRLDOWN}v{CTRLUP}{ENTER}
MouseClick, left, 960, 790
Sleep, 800
MouseClick, left, 488, 72
Sleep, 800
;MouseClick, left, 510, 63
Send, {CTRLDOWN}2{CTRLUP}
Sleep, 800
Send, {CTRLDOWN}3{CTRLUP}
Return
ExitApp
Buttonפתחמערכת:
Run,c:\SimSoc\Console4Sp1\Current\bin\SimSoc.bat Console
WinWait, SimSoc Console 4.0.1.5579.3
IfWinNotActive, SimSoc Console 4.0.1.5579.3,WinActivate, SimSoc Console 4.0.1.5579.3 ,
WinWaitActive, SimSoc Console 4.0.1.5579.3 ,
Sleep 500
SendInput testuser
Sleep 500
SendInput {TAB}
Sleep 500
SendInput deskhelp
Sleep 500
SendInput {ENTER}
Return
ExitApp
ButtonKB:
WinWait, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
IfWinNotActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010., , WinActivate, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
WinWaitActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
MouseClick, left, 279, 62
Sleep, 100
Return
ExitApp
Buttonסגורקריאה:
Send, {CTRLDOWN}t{CTRLUP}
WinWait, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
IfWinNotActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010., , WinActivate, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
WinWaitActive, SimSoc Console 4.0.1.5579.3 [testsystem:testuser.ast] Production license`, issued to Test System`, expires Jan 01`, 2010.,
;MouseClick, left, 518, 479
;Sleep, 300
Send, {CTRLDOWN}t{CTRLUP}
WinWait, Annotate Events,
IfWinNotActive, Annotate Events, , WinActivate, Annotate Events,
WinWaitActive, Annotate Events,
MouseClick, left, 227, 62
Sleep, 300
Send, {CTRLDOWN}c{CTRLUP}
MouseClick, left, 235, 190
Sleep, 300
MouseClick, left, 273, 528
Sleep, 300
Return
ExitApp
GuiClose:
ExitApp
[quote][/quote]