Sign in to follow this  
Followers 0
Flok3r

Problem with @scriptfullpath

6 posts in this topic

I've a problem with @scriptfullpath or variants of it (@scriptdir & '\' & @scriptname) on XP, on 7 it works fine.

I simply want a script to execute a 2nd session of itself by doing for example:

--

msgbox(0,"","Hello World")

run(@sciptfullpath)

exit

--

error is 0.

i have already tried with _rundos(@scriptfullpath) and so on, too, but no luck on XP :)

Any suggestions for solutions or workarounds would be greatly appreciated :)

Thanks, Flok3r

Share this post


Link to post
Share on other sites



I think you first have to compile the program, because Run() can't run a .au3 as far as I know, try to do it with the compiled script or use ShellExecute() instead. :)


PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

Share this post


Link to post
Share on other sites

Oops, im sorry i forgot to mention that:

yea, of course the script has to be compiled and i tried runas, rundos, but shellexecute did the trick, thanks !

But why this doesnt work with run/runas on xp?

Share this post


Link to post
Share on other sites

I don't know, but if you really want to know, I think you have to go to the developers - they made these functions..


PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.

Share this post


Link to post
Share on other sites

It would be very helpful to see the exact code you run and it fails.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Do you have spaces in your "Full Path"?

Try:

Run('"' & @ScriptFullPath & '"')

Edit:

The above has to be compiled of course, or you could do:

Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptFullPath & '"')

If it's not compiled, however I would not suggest just running that one line by itself, as it will spawn several instances of the script running.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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