Jump to content

Recommended Posts

Posted

When I try to run the script nothing happens and the script ends without errors. I think maybe the array is wrong by chance.

 

 

Func Script1()
    Run("notepad.exe")
    WinWaitActive("Untitled - Notepad")
    Send("This is script 1.")
    Send("!n")
EndFunc   ;==>Script1

Func Script2()
    Run("notepad.exe")
    WinWaitActive("Untitled - Notepad")
    Send("This is script 2.")
    Send("!n")
EndFunc   ;==>Script2

Func Script3()
    Run("notepad.exe")
    WinWaitActive("Untitled - Notepad")
    Send("This is script 3.")
    Send("!n")
EndFunc   ;==>Script3

If $CmdLine[0] = 1 Then
    Switch $CmdLine[1]
        Case "/1"
            Script1()
        Case "/2"
            Script2()
        Case "/3"
            Script3()
    EndSwitch
EndIf

 

Posted
Posted (edited)

It works fine...(though probably not ideal). just compile it to an exe. and then run it from the command line using the command line parameters you specified.  

You are certainly welcome to entertain us with the way you thought you were running it.

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Posted

I think your problem is that your OS is not English. For me, It does not work. I use Spanish OS. So I use the CLASS Name.

 

Saludos

Posted

that doesnt even execute notepad on the Spanish OS?

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Posted (edited)

that doesnt even execute notepad on the Spanish OS?

Yes It runs. But does not work this part 

WinWaitActive("Untitled - Notepad")
    Send("This is script 2.")
    Send("!n")

 

@aa2zz6

If you want to test in Scite just add your parameters  Shift+F8 

Saludos

Edited by Danyfirex
Add
Posted

Did you first add the command line parameter using Shift+F8 ?

I should work if you first add the command line parameter.

 

Saludos

Posted

I haven't done much with command line parameter and after examining the Help File I don't seem to have a clear understanding. 

Posted (edited)

nothing mysterious about them.  Just think of command line parameters as parameters for the command line  :)

hit - F7

open - command prompt

navigate to the path and type -  WhateverYouNamedThatFile.exe /1

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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
  • Recently Browsing   0 members

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