Jump to content

Run ("AIM.exe /paremeters?") or commands..


Recommended Posts

How would I go about giving a command to AIM (instant message program) from AutoIt? I can do this in batch files, but not to sure how to do it in AutoIt... For example, in batch files, it would be something like

Batch

start aim:goim?screename=screenamehere&message=messagehere

So how could I do something like this in AutoIt??

FootbaG
Link to post
Share on other sites

Ok, thank you CyberSlug, except now...I got this:

Run(@ComSpec & " /c start aim:goim?screename=Test&message=Test", "", @SW_HIDE)

It works and all, except for a little thing, two little things actually:

1: It brings up the AIM IM Window, but it doesn't type in the Screename, or the message...How come?

2: Is there a way to make the message=$variable&screename=$variable2 ????? Because if I can't then my program goes down the drain =/

Thanks for the help = D

FootbaG
Link to post
Share on other sites

I wonder if the help file would explain how to concatenate string literals and variables... nah, probably not, thats not something people would do in virtually every script they write.

Edit: Typo (Fixed).

Edited by Valik
Link to post
Share on other sites

Layer after some research this is what I came up with (BTW This took some extensive testing (1 hour) just to figure out how to make it accept the variables.

$screenname = "A screenname here"
$message = "This is a total test please work"

If StringInStr($screenname, " ") Then
   $screenname = StringReplace($screenname, " ", "+", 0, 0)
EndIf
If StringInStr($message, " ") Then
   $message = StringReplace($message, " ", "+", 0, 0)
EndIf

Run(@ComSpec & ' /c start aim:goim?screenname=' & '"' & $screenname & '&message=' & $message, '',@SW_HIDE)

The reason I replace all spaces with +'s is because that is how it is recommended. It also allows you not to have to mess with the quotation as much.

If you notice right in the middle of the run statement I had to put a '"' before the screenname. Putting that in is the only way I have found to make the variables work.

Let me know if you have any questions,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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

    No registered users viewing this page.

×
×
  • Create New...