DataJack Posted November 20, 2009 Share Posted November 20, 2009 Hi guys and gurus, I'm pretty new to AutoIt, love it. I hope it's the right forum to post this! I'd like some help with a script tho'. Well first, you'll probably tell me if it is possible. So here's the deal: I've got some app (Remote Camera viewing software) being run by a script already, some field gets filled also. I'd like to run it fullscreen (That's no problem, there's even a shortcut F11)... Here's the problem tho'. I'm running all this on a touchscreen so there's no way out once in fullscreen mode. Would it be possible to create 2 buttons (pictures preferably, like not in a form(window)), always on top, which would minimize back and/or close the app? Basically, I'd need to create a minimize and close button on top right corner of the screen. Is it possible? How bad of a script would it be? Thanks, your help will be greatly appreciated!! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 20, 2009 Moderators Share Posted November 20, 2009 (edited) DataJack,First, welcome to the Autoit forums. Try running this and see if it works. Some apps run with TOPMOST themselves and so overlay the AutoIT GUI. There might be some ways around this - so it would not necessarily be a show-stopper:#include <WindowsConstants.au3> $hGUI = GUICreate("InputBox Move Focus Demo", 160, 30, @DesktopWidth - 160, 0, $WS_POPUP, $WS_EX_TOPMOST) $hButton_Min = GUICtrlCreateButton("Minimise", 0, 0, 80, 30) $hButton_Exit = GUICtrlCreateButton("Exit", 80, 0, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $hButton_Min ; Send() ; Whatever key you need to minimise the app Case $hButton_Exit ; Send() ; Whatever key you need to close the app Exit EndSwitch WEndThe key will be if you can see the buttons once you have full-screened your app.M23Edit: Do you actually need buttons? Would HotKeys be as useful? Edited November 20, 2009 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AppTux Posted November 20, 2009 Share Posted November 20, 2009 Hi guys and gurus, I'm pretty new to AutoIt, love it. I hope it's the right forum to post this! I'd like some help with a script tho'. Well first, you'll probably tell me if it is possible. So here's the deal: I've got some app (Remote Camera viewing software) being run by a script already, some field gets filled also. I'd like to run it fullscreen (That's no problem, there's even a shortcut F11)... Here's the problem tho'. I'm running all this on a touchscreen so there's no way out once in fullscreen mode. Would it be possible to create 2 buttons (pictures preferably, like not in a form(window)), always on top, which would minimize back and/or close the app? Basically, I'd need to create a minimize and close button on top right corner of the screen. Is it possible? How bad of a script would it be? Thanks, your help will be greatly appreciated!! I am also a newbie, so i can't answer very good, but i think it isn't possible. but you can make a little gui that contains 2 buttons. like this #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> Opt("MustDeclareVars",1) Function1() Func Function1() Local $Button1,$Button2,$Button3,$Msg GUICreate("Form1",200,50,@DesktopWidth -200,0,$WS_POPUP) ;You can replace this with images, the same thing happen $Button1 = GUICtrlCreateButton("Minimize",0,0,100,25) ;You can make the buttons bigger for the touchscreen $Button2 = GUICtrlCreateButton("Close",100,0,100,25) $Button3 = GUICtrlCreateButton("Close window",0,25,200,25) GUISetState() Do GUISetState() ;Set always the window on top $Msg = GUIGetMsg() If $Msg = $Button1 Then ;command to minimize the program ElseIf $Msg = $Button2 Then ;command to close the program ElseIf $Msg = $Button3 Then Exit EndIf Until $Msg = $GUI_EVENT_CLOSE EndFunc PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore. Link to comment Share on other sites More sharing options...
DataJack Posted November 21, 2009 Author Share Posted November 21, 2009 (edited) Wow, thanks guys! I'm trying that as I speak.. well.. type.. Anyway.. I give it a try and give you the news! (Yes I did needed buttons, as I'm working with touchscreens (no keyboard) and thus there is not a lot hot"keys" I can use!) Edited November 21, 2009 by DataJack Link to comment Share on other sites More sharing options...
DataJack Posted December 7, 2009 Author Share Posted December 7, 2009 It worked! Thanks guys, it's sincerely appreciated!!! Did some tweeking and all but it works marvelously! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now