 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Dummy Gui for Monitoring Guest
|
Posted: Thu Jan 08, 2009 3:05 pm Post subject: Needed help |
|
|
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] |
|
|
| Back to top |
|
 |
cerewa notloggedin Guest
|
Posted: Thu Jan 08, 2009 4:31 pm Post subject: |
|
|
you can make a gui be always-on-top by specifying
| Code: | gui, +alwaysontop
Gui, Show, put-your-code-here |
If you want a gui that can be closed only by 1) terminating the script, or 2) clicking the x in the top-right of the window, and which does not have buttons for minimize/maximize/restore, nor does it show up on taskbar or allow resizing:
| Code: | gui, +alwaysontop +toolwindow -resize
Gui, Show, put-your-code-here |
I'm not sure how to remove the "x" in the top right of the window.
More info at "GUI" in the help manual's list of commands. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jan 08, 2009 8:52 pm Post subject: |
|
|
hey , thanks for the help
ive just started using AHK and i really love it
i just dont want the gui to be closed
as the NOC/SOC will be operated by computer dummies (their only there to see if an alert pops of the screen and use the macro)
and if it will be closed , im not sure they'll be able to open it
(lolmonkeys) |
|
| Back to top |
|
 |
tobadyurdead
Joined: 04 May 2008 Posts: 168
|
Posted: Thu Jan 08, 2009 9:04 pm Post subject: |
|
|
Hmm, let me get this right..you want to make the gui NOT close when you hit the X at the top right? well...If that is what you want to do, you could specify somthing else for the GUI to do when the X it pressed ..somthing like this ( Im not exactly sure what you want , because i have a concussion o.o)
| Code: |
gui,add,edit, W500 H500,Hello
gui, -resize
gui,show
return
guiclose:
guiexit:
return ; putting "Sleep, 1" would also me effective i would assume
|
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 09, 2009 10:18 am Post subject: |
|
|
yes, that is true
i dont want them to be able to close the gui window
thanks ill try the modifications |
|
| Back to top |
|
 |
Tseik
Joined: 09 Oct 2008 Posts: 180 Location: Finland
|
Posted: Fri Jan 09, 2009 10:43 am Post subject: |
|
|
use also #NoTrayIcon so people cant quit it from there.
They also could quit it from Task Manager.
This could help if u can fit it somewhere:
| Code: | IfWinActive, Windows Task Manager
WinClose, Windows Task Manager |
|
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 726 Location: Calgary, AB, Canada
|
Posted: Fri Jan 09, 2009 3:09 pm Post subject: |
|
|
Name your script something that sounds important and compile it. It will show up in TaskManager under that name. Try something like "WinlogonControl.exe"... I doubt anyone would close that without knowing what it is.
| Code: | #NoTrayIcon
Gui, -Caption +ToolWindow +AlwaysOnTop
Gui, Show ; Make some Coords, or it will be stuck directly in the middle of the screen. |
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 09, 2009 3:43 pm Post subject: |
|
|
is there a way for AHK to detect certain text or buttons ?
(not processes) |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jan 09, 2009 4:01 pm Post subject: |
|
|
| Tseik wrote: | use also #NoTrayIcon so people cant quit it from there.
They also could quit it from Task Manager.
This could help if u can fit it somewhere:
| Code: | IfWinActive, Windows Task Manager
WinClose, Windows Task Manager |
|
i loled
their not that sophisticated
thank you though |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 726 Location: Calgary, AB, Canada
|
Posted: Fri Jan 09, 2009 4:32 pm Post subject: |
|
|
| Question seems a little odd for this topic, but yes. It's the "WinText" parameter close to the "WinTitle" parameter on each command. Use "WinGetText" to retrieve the actual text. |
|
| Back to top |
|
 |
Tseik
Joined: 09 Oct 2008 Posts: 180 Location: Finland
|
Posted: Fri Jan 09, 2009 4:49 pm Post subject: |
|
|
its hard to remember sometimes that other people are just normal mortals.  |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jan 10, 2009 9:05 pm Post subject: |
|
|
got it
yea i started doing this thread as a "guest" and didnt see the Subject well , guess i misfilled it and theres no way i can edit it  |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Jan 11, 2009 3:19 pm Post subject: |
|
|
is there a way to add a progress bar as far as the script progresses ? (the first one takes around 30 seconds to complete)
could be nice ^^ |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|