Sign in to follow this  
Followers 0
sebmeikle

Can someone write a small script for me?

13 posts in this topic

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.

Share this post


Link to post
Share on other sites



You might want to rephrase the question. Just about everybody on here will tell you that they're not going to write anything for you. A hint: Provide some code that doesn't work, and ask for some help fixing it.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Use the window info tool to get the class of the box if you can, and use that in Controlsettext

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Text is some text on the window you want to access, leave it "" unless you have 2 windows with the Title.

Newtext is the text you want to go there. Flag can be 0 or not used at all.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Looks good to me.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Cheers. The sleep function did the trick.

Thank you for all your help.

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