Jump to content

Restore Down


 Share

Recommended Posts

  • Moderators

@Keylonta  The help file is your friend. Look at WinSetState, specifically the Restore option.

I've also moved this to the appropriate forum, as the question has nothing to do with AutoItX. Please be mindful of where you post in the future :)

 

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for your reply.

The Intelliremote user guide says "By default Intelliremote supports the 90+ AutoItX commands found in the AutoItX help file." But the help file is a AutoItX3 help file. What is the appropriate forum to post in?

 

When I tested the following 3 commands it says there is a problem with the command WINSETSATE: 'SW.RESTORE" is not a valid integer value.

WinSetState ("Untitled - Notepad", "", "SW_RESTORE")

WinSetState ("Untitled - Notepad", "", "{SW_RESTORE}")

WinSetState ("Untitled - Notepad", "", SW_RESTORE)

I have to put the " " around SW_RESTORE otherwise it doesn't turn blue. Any idea why it's not working?

 

Here are some examples of how other commands have to be to work with Intelliremote.

WinSetTitle ("Untitled - Notepad", "", "New Title")

Send ("{LEFT}",0)

MouseClick ("left" INTDEFAULT, INTDEFAULT, 1, 0)

MouseMove (1919, 0, 0)

 

This is what the help file says:

1.JPG

Link to comment
Share on other sites

I think this example is  incorrect.
This is not tested, as I remember I never use AutoItX, but try this:

Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

oAutoIt.WinSetState "Untitled -", "", "SW_HIDE"
oAutoIt.Sleep 3000
oAutoIt.WinSetState "Untitled -", "", "SW_SHOW"

btw.
Why you are using AutoItX and at the same time you are posting example for standard version ?

4 hours ago, Keylonta said:

WinSetState ("Untitled - Notepad", "", "SW_RESTORE")

WinSetState ("Untitled - Notepad", "", "{SW_RESTORE}")

WinSetState ("Untitled - Notepad", "", SW_RESTORE)

 

4 hours ago, Keylonta said:

WinSetTitle ("Untitled - Notepad", "", "New Title")

Send ("{LEFT}",0)

MouseClick ("left" INTDEFAULT, INTDEFAULT, 1, 0)

MouseMove (1919, 0, 0)

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

It appears Intelliremote  can use AutoItX or compiled AutoIt scripts. See https://www.autoitscript.com/forum/topic/66945-execute-au3-scripts-via-autoitx/#comment-508043
Also see https://www.autoitscript.com/forum/topic/55863-intelliremote-and-autoitx/#comment-423719
and, https://www.autoitscript.com/forum/topic/54219-delphi-wrapper-advanced/#comment-498528

Because @SW_HIDE and @SW_SHOW  are AutoIt3 language macros that result in 0 and 5, and if WinSetState has been tailored to work in Intelliremote, then try this script in Intelliremote.

Run("notepad.exe", "")
WinWaitActive("Untitled - Notepad", "", 0)
WinSetState("Untitled - Notepad", "", 0) ;  @SW_HIDE
Sleep(3000)
WinSetState("Untitled - Notepad", "", 5) ; @SW_SHOW

 

Link to comment
Share on other sites

Thanks for the feedback everyone.

I don’t know anything about AutoIt, just starting out because of Intelliremote.

What is the difference between AutoItX and AutoIt?

On 11/4/2017 at 6:33 PM, mLipok said:

btw.
Why you are using AutoItX and at the same time you are posting example for standard version ?

I couldn’t get the AutoItX WinSetState scripts in the help file to work, so I tried modifying them to look like the script examples given in the Intelliremote user guide. Where can I find the help file for the standard version? That should have the correct WinSetState scripts that work with Intelliremote.

On 11/4/2017 at 11:55 PM, Malkey said:

Because @SW_HIDE and @SW_SHOW  are AutoIt3 language macros that result in 0 and 5, and if WinSetState has been tailored to work in Intelliremote, then try this script in Intelliremote.

I figured it out. Restore down looks like this:

WinSetState ("Untitled - Notepad", "", 1)

0 = Closes program

1 = Restores down

2 = Minimizes

3 = Maximizes

I figured it out. Restore down looks like this:

WinSetState ("Untitled - Notepad", "", 1)

0 = Closes program

1 = Restores down

2 = Minimizes

3 = Maximizes

I figured it out. Restore down looks like this:

WinSetState ("Untitled - Notepad", "", 1)

0 = Closes program

1 = Restores down

2 = Minimizes

3 = Maximizes

I figured it out. Restore down looks like this:fkkkkhhhhhhhhhhhgggg

 

 

WinSetState ("Untitled - Notepad", "", 1)

0 = Closes program

1 = Restores down

2 = Minimizes

3 = Maximize

Link to comment
Share on other sites

This is copied from the introduction of the AutoIt 'X' help file:-
"AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI. ....

AutoItX is a DLL version of AutoIt v3 that provides a subset of the features of AutoIt via an ActiveX/COM and DLL interface. This means that you can add AutoIt-like features to your favourite scripting and programming languages, e.g. VB, VBScript, Delphi, C, C++, Kixtart, and most other languages that support the use of DLLs."

The AutoIt help file is found in the AutoIt install directory with the .chm file extension.  Or, while using SciTE, pressing F1 key on the text of a .au3 file will activate the AutoIt help file.

The following example is a workable .au3 file. Using the text editor SciTE, this .au3 file can be run within SciTE, or, compiled to run as an independent executable file.
(Note the returned values of the AutoIt macros in the message box :-
@SW_RESTORE returns 9,
@SW_MINIMIZE returns 6, and,
@SW_MAXIMIZE returns 3.)

MsgBox(0, "Some Macros", _
        "@SW_RESTORE returns   " & @SW_RESTORE & @CRLF & _  ; Returns 9
        "@SW_MINIMIZEE returns " & @SW_MINIMIZE & @CRLF & _ ; Returns 6
        "@SW_MAXIMIZE returns  " & @SW_MAXIMIZE & @CRLF)    ; Returns 3

 

Link to comment
Share on other sites

On 11/9/2017 at 11:02 PM, Malkey said:

The following example is a workable .au3 file. Using the text editor SciTE, this .au3 file can be run within SciTE, or, compiled to run as an independent executable file.

They don't work with Intelliremote.

What version help file has the following script?

WinSetState ("Untitled - Notepad", "", 1)

That's the one I need.

 

Link to comment
Share on other sites

The help file is in the "AutoIt Full Installation".   Download from here .
The "AutoIt Script Editor" (SciTE) I mentioned in my other post is also downloadable at the above link.

The current AutoIt help file is also online, where  the WinSetState() function can be viewed.

In your post #3, the image of the AutoItX WinSetState function help page has an example.  I got that example to work by saving that example as a .vbs file and running it as a VB script.

When you install the "AutoIt Full Installation" the AutoItX help file is found in the AutoItX subdirectory.
The AutoIt3 help file is found in the main AutoIt3 installation directory, and as mention in my post #9.  The example in post #9 is an  AutoIt3 (.au3) script, which can be run from SciTE, or, compile and run as a .exe file.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...