Sign in to follow this  
Followers 0
AliOzturk

Opens & Minimizing script

6 posts in this topic

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?

Share this post


Link to post
Share on other sites



Opens a specific program from the taskbar

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 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.

Share this post


Link to post
Share on other sites

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 1

oh but i meant the .. traybar thing :

http://screensnapr.com/e/7GnP1X.jpg

The program i wanna open is .. already active

Like 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

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by nacon

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0