Jump to content

Passing an argument


Gaviel
 Share

Recommended Posts

I think the example for _IENavigate should give you an idea.

I already saw and have read it already .. Maybe I'm not clear with my question ..

For example .. I want to open a facebook profile

http://www.facebook.com/#!/profile.php?id=[argument]

we're argument is the profile ID that I will pass ..

How to do it with autoit?!

thanks ..

PS: I already see the $cmdline in the help section .. But I can't understand how to apply it in a URL ..

Edited by Gaviel
Link to comment
Share on other sites

$sID = "blahblah"
_IECreate("http://www.facebook.com/#!/profile.php?id=" & $sID)

I think you only assigned a variable there .. So If I compiled .. That would just simply open or can open only 1 URL ..

How can I make this clear ..

hmm ... Is it possible to pass command line options to an application written or compiled in Autoit when you start the application ..?

I hope I'm clear with my question ..

thanks for the replies ..

Link to comment
Share on other sites

  • Moderators

Gaviel,

I hope I'm clear with my question

Your question is clear now! :)

Look in the Help file under <Using AutoIt - Command Line Parameters> and hopefully the answer will become equally clear. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Gaviel,

Your question is clear now! ;)

Look in the Help file under <Using AutoIt - Command Line Parameters> and hopefully the answer will become equally clear. :)

M23

;) On my post above .. I already mentioned that I already read that .. But unfortunately I can't get it working right ..

here's the code that I tried

#include <IE.au3>
$oIE = _IECreate ("http://www.$cmdLine[1].com")

But after I compiled it and run it in Command Prompt .. I get an error saying "Error in expression"

Link to comment
Share on other sites

  • Moderators

:) Gaviel,

You need to learn a bit more about AutoIt before you go much further! :shocked:

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading. ;)

In this case you need to use the concatenation operator & to combine the strings like this:

$oIE = _IECreate ("http://www." & $cmdLine[1] & ".com")

I would really recommend the tutorials - you will find coding much less frustrating when you have a better grasp of the syntax and structure of an Autoit script! ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

;) Gaviel,

You need to learn a bit more about AutoIt before you go much further! :)

Reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here - you will find other tutorials in the Wiki (the link is at the top of the page). There are even video tutorials on YouTube if you prefer watching to reading. :)

In this case you need to use the concatenation operator & to combine the strings like this:

$oIE = _IECreate ("http://www." & $cmdLine[1] & ".com")

I would really recommend the tutorials - you will find coding much less frustrating when you have a better grasp of the syntax and structure of an Autoit script! :shocked:

M23

So that's what I'm missing .. Thank you so much ..

Yeah .. I think I'll go with the reading .. Will probably look at the wiki ..

thanks again for all the replies . ;)

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