Sign in to follow this  
Followers 0
gcue

AutoIt3ExecuteLine quotes/syntax

27 posts in this topic

i am trying to run a line outside of my script so that the gui doesnt become unresponsive... im unable to get the syntax right though..

can anyone assist?

Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "_IENavigate(' & $IE & ',' & $URL, 0) "')

Share this post


Link to post
Share on other sites



Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "_IENavigate(' & $IE & ',' & $URL &',' & 0 & ')"')


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

i got an error:

_IENavigate(,c:\temp\camera.html,0)

_IENavigate(,C^error

missing seperator character after keyword

thanks Xeno

Share this post


Link to post
Share on other sites

Okay, you need to quote the strings or your variables.

Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "_IENavigate("' & $IE & '","' & $URL & '",' & 0 & ')"')

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

In this case variable $IE is empty or not used before.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

new error:

_IENavigate(",c:\temp\camera.html,0)

_IENavigate(^error

error: string missing closing quote

dont see where else to put quotes - looks fine to me

thanks again Xeno

water:

$ie is not empty and is defined

Edited by gcue

Share this post


Link to post
Share on other sites

How about this?

Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine ''_IENavigate("' & $IE & '","' & $URL & ''',' & 0 & ')"')

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

'_IENavigate(,C:\TEMP\Camera.html',0)

^ERROR

error: unable to parse line.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I don't think you can do what you want at all.

_IENavigate needs an "Object variable of an InternetExplorer.Application, Window or Frame object" (according to the help file). This parameter is passed ByRef.

I don't think you can pass a pointer to another process and access the address space of the calling process the way you want to do it.

But maybe an AutoIt guru can shed some light on this.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I don't think you can do what you want at all.

_IENavigate needs an "Object variable of an InternetExplorer.Application, Window or Frame object" (according to the help file). This parameter is passed ByRef.

I don't think you can pass a pointer to another process and access the address space of the calling process the way you want to do it.

But maybe an AutoIt guru can shed some light on this.

I guess water is correct. But this seems correct in the console although it doesn't work at all.

#include <IE.au3>
$URL = "www.autoitscript.com"
$oIE = _IECreate ("bild.de")
ConsoleWrite('_IENavigate(' & $oIE & ',"' & $URL & '",' & 0 & ')' & @CRLF)
Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "_IENavigate(' & $oIE & ',"' & $URL & '",' & 0 & ')"')

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

what about on a custom function like this one? can it be used with it?

_CopyWithProgress($source_path, $source_path, $target_path)

Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "_CopyWithProgress("' & $source_path & '","' & $source_path & '","' & $target_path & ')"')
Edited by gcue

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Every function that you can pass the "content" of the parameters not just a pointer to it can be used - IMHO.

Check the function you want to use in the help file. If you find a "ByRef" for any of the parameters then you're out of luck.

BTW: /AutoIt3ExecuteLine seems to execute a single line only. So you can only execute lines "internal" to AutoIt. No #include allowed.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

if i can't use /AutoIt3ExecuteLine any other way i can execute the ienavigate so that the gui doesnt become unresponsive?

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Why not just do a

ShellExecute("C:\Program Files\Internet Explorer\iexplore.exe", $URL)
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

im creating a gui to execute it in bc i want to control its size and i have a combobox to toggle other pages

Share this post


Link to post
Share on other sites

Then put everything you need in a second script and start it from your main script.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

wouldnt the second gui then become unresponsive?

Edited by gcue

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

wouldnt the second gui then become unresponsive?

Wait, in your first post you just wanted to start IE and open an URL.

I understand that you want to GUI stuff in script1 and the IE think in parallel in script2. Right?

If not you need to elaborate a bit more.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

sorry about that water..

i have a gui with an IE Embedded object and i use the gui to IENavigate to a website. it has a combobox to change to different sites.

Share this post


Link to post
Share on other sites

sorry about that water..

i have a gui with an IE Embedded object and i use the gui to IENavigate to a website. it has a combobox to change to different sites.

This is the function of script2?

If you use run or shellexecute to start script2 from script1 then you start a complete independant process and script1 keeps on running.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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