AliOzturk Posted June 9, 2012 Share Posted June 9, 2012 Hello you guys So i'm working on my first script and got a few unanswered questions i would love to get answered. First of all, is it possible to create a script that : 1. Opens a specific program from the taskbar (in this case, a text editor) 2. Performs an action/function inside this program (in this case, the text editor) 3. Then tray it minimize/tray it. Sorry for bad explaining, but idk how else to explain this. Pretty simple, hope to get some answers. PS: I would like this done fast, like maybe a few seconds? Link to comment Share on other sites More sharing options...
PhoenixXL Posted June 9, 2012 Share Posted June 9, 2012 Opens a specific program from the taskbarFor a Pinned program u may try the keys {START}+{X} where X is the index of the Pinned Application note that the First application is 1 My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
AliOzturk Posted June 9, 2012 Author Share Posted June 9, 2012 For a Pinned program u may try the keys {START}+{X} where X is the index of the Pinned Application note that the First application is 1oh but i meant the .. traybar thing :http://screensnapr.com/e/7GnP1X.jpgThe program i wanna open is .. already activeLike if i had notepad open and i minimzed it - then i want it to open again and do something inside it really fast and then minimize it.In this case i would use the script so it could "open up" notepad, write something inside it and then minimize it in secs.Tell me if you're confused, i'll try explain better next time lol Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 9, 2012 Moderators Share Posted June 9, 2012 nacon,Look at WinSetState in the Help file - that will do what you want. M23 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...
PhoenixXL Posted June 9, 2012 Share Posted June 9, 2012 (edited) In this case i would use the script so it could "open up" notepad, write something inside it and then minimize it in secs. It can create a chance maybe for a Millisecond that someone would notice a Glance of it So try to it with controls i.e. using ControlSetText or ControlSend or ControlCommand. To get the Control Id of a Control use the Autoit Window Info Tool. Example code :Run("notepad.exe",'',@SW_SHOWMINIMIZED) WinWait("[CLASS:Notepad]") ControlSetText("[CLASS:Notepad]", "", "Edit1", "New Text Here" ) Regards Phoenix XL Edited June 9, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
AliOzturk Posted June 9, 2012 Author Share Posted June 9, 2012 (edited) nacon, Look at WinSetState in the Help file - that will do what you want. M23 Exactly! Thanks alot, really helpful! It can create a chance maybe for a Millisecond that someone would notice a Glance of it So try to it with controls i.e. using ControlSetText or ControlSend or ControlCommand. To get the Control Id of a Control use the Autoit Window Info Tool. Example code :Run("notepad.exe",'',@SW_SHOWMINIMIZED) WinWait("[CLASS:Notepad]") ControlSetText("[CLASS:Notepad]", "", "Edit1", "New Text Here" ) Regards Phoenix XL oh i see what i did wrong there. I explained wrong and u misunderstood. Not what i was looking for, but i'm really glad you helped anyway! :-) Got it working and i got a few new issues i will post in a new thread. once again, thanks so much! Edited June 9, 2012 by nacon 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