Learning to Script with Scite Script Editor

in #utopian-io7 years ago (edited)

What Will I Learn?

  • You will learn basic use of the Scite Script Editor Tool,.
  • You will learn an introduction to Send, to window titles, to the Run function, to some Windows functions
  • You will learn show you some basic automation

Requirements

  • Scite Script Editor any version
  • Notepad / Wordpad Application

Difficulty

  • Basic

Tutorial Contents

Using Autoit , teaches you basic knowledge with scripting in AutoIt, how make scripting, how to build script be an application.

Learning to Script with Scite Script Editor

SciTE is open source text editor for windows and Linux. SciTE is a Scintilla based Text Editor. Generally useful editor with facilities for building and running programs. SciTE It ease of scripting, especially with all the tools available for quick and easy use.
This tutorial is about the automation of notepad , there are to send some text multiple line to our notepad/wordpad.

The steps :

Step 1: Run SciTE or Open SciTE from Start > All Programs > AutoIt v3 > SciTE > SciTE

Step 2 : Create a new script with press File --> New or CTRL+N on keyboard.
After that, add script like this below :

So this is the means line by line from above script.

• Run("notepad.exe") --> So this is the first thing we need to do run NotepadTo do that we get the Notepad executable (notepad.exe). We got that from looking at the short cut to notepad in the Start Menu.
• WinWaitActive("Untitled - Notepad") --> to save the script , run it and with Notepad the window title is Untitled - Notepad. After running a copy of Notepad we need to wait for it to appear and become active before we send any keystrokes. We can wait for a window using the WinWaitActive.
• Send("hello steemians...."& @CRLF & "how are you today!") --> to send new lines, or stop the user from interfering from the text being sent. We also used the
• macro @CRLF, which is a carriage return and a line feed.
• WinClose("Untitled - Notepad") --> You should see Notepad open, and then some text will magically appear!. Next we want to close notepad, we can do this with the WinClose function.
• WinWaitActive("Notepad", "Do you want to save") --> When Notepad tries to close you will get a message asking you to save the changes. Use the Window Info Tool to get details of the dialog that has popped up so that we can respond to it.
• Send("!n") --> So we want to automatically press Alt-N to select the No/Don't save button (Underlined letters in windows usually indicate that you can use the ALT key and that letter as a keyboard shortcut).
Step 3 : Press File --> Save or CTRL+S to save your script .

Step 4 : Save file anywhere do you like. As you can see there is file will be save with extention .au3 (the file extension for AutoIt V3 scripts). Dont forget type your filename with any name, example : send_to_notepad.

Step 5 : Next press Tools --> Compile or press CTRL+F7

Step 6 : As you see by the picture below the output file is with extention .exe and we can compile file for X86 version or X32 version. So press compile script button.

Step 7 :That’s script finished to compile and there is no error

Step 8 : Next step run the script , press Tools --> Go or press F5

Step 9 : You will see Notepad open, some text appears with multiple line, then it you can save or dont save.

Step 10 : We can get the file executable in where the folder you was save the script.
As you see there are have 3 file with extention .au3 and 2 file extention .exe.

Ok hopefully usefull and good luck !
You can get my project on -->Download Project



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules, and is considered as plagiarism. Plagiarism is not allowed on Utopian, and posts that engage in plagiarism will be flagged and hidden forever.

As mentioned by @cheetah you plagiarised it from https://www.autoitscript.com/autoit3/docs/tutorials/notepad/notepad.htm

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.22
TRX 0.26
JST 0.039
BTC 94003.99
ETH 3310.95
USDT 1.00
SBD 3.12