Jump to content

Can someone write a small script for me?


 Share

Recommended Posts

Could someone spare a few minutes to write a small script for me. I've tried doing it myself, this is probably a very simple macro but I don't want to spend hours for somthing that could be done in a few minutes.

What I need is a script that will open this program:

http://www.mediafire.com/?mdjwjwho4dd

ICON 225 USB Connect(824Kb)

Then click "Show settings" and enter the three login credentials User Name, Password and APN(Access Point Name). Click the Save button then click Connect.

I can easily edit the script to change the location of the program and edit the user name, password and apn.

I would really appreacite this.

Link to comment
Share on other sites

Ok, that's fair enough.

I've started writing one but I can't work out how to make the macro select a specific text box and add the text.

This is what I have so far:

; Veryfy To Start
    $answer = MsgBox(4, "Connect Utility by Seb Meikle", "Connect to Orange 3G?")

    If $answer = 7 Then
        Exit
    EndIf

;Run Utility
Run ("c:\orange\ICON 225 USB Connect.exe")
WinWaitActive ("ICON 225 USB Connect")

;Add Credentials

I assume I have to use the AutoIt Window Info Tool to get the information about each editable text box and buttons.

Link to comment
Share on other sites

Hmm. I'm so new to all this.

This is what I have done, but I am getting a error(Incorrect amount of call functions).

;Add Credentials
ControlSetText ("ICON 225 USB Connect", "Multimedia", 1023)

Title - I assume this is the title of the window?

Text - I'm guessing this is the text I want entered into the text box.

ControlID - I guess this is the ID of the text box.

NewText - What this?

Flag - Whats this?

Many Thanks

Link to comment
Share on other sites

Ok, thanks for all your help.

I managed to get it to work. Just wanted an opinion on this script.

; Veryfy To Start
    $answer = MsgBox(4, "Connect Utility by Seb Meikle", "Connect to Orange 3G?")

    If $answer = 7 Then
        Exit
    EndIf

;Run Utility
Run ("c:\orange\ICON 225 USB Connect.exe")
WinWaitActive ("ICON 225 USB Connect")

;Add Credentials
ControlSetText("ICON 225 USB Connect", "", 1023, "Multimedia")
ControlSetText("ICON 225 USB Connect", "", 1025, "Orange")
ControlSetText("ICON 225 USB Connect", "", 1015, "orangewap")

;Save
ControlClick ("ICON 225 USB Connect", "Save", 1016)

;Connect
ControlClick ("ICON 225 USB Connect", "Connect", 1017)

I know it works, but is this coded correctly? Is this how code should be layed out etc..

P.s

The login details are universial so it doesn't matter that people can see them.

Link to comment
Share on other sites

I have one more question.

When the program is started it needs a few seconds(between 2 and 5) to register its-self to the network. When this has happened it says "Register to Orange" in the status bar.

How would I make the script pause untill this has happened? What is the script command?

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