Sign in to follow this  
Followers 0
amfony

Can i start another script after one finshes (ends)

8 posts in this topic

Hi Everyone,

Simple question: Can i start a new script at the end of another - without CALL-ing it? I know it sounds silly and against all my knowldge of programming/scripting.

Problem: I have a 2 things (a third party service - USBDLM) that will let me call an EXE or similar at 'ONARRIVAL' of usb device, in addition to setting a specifiec drive letter. What i have (written and works) is a script that will do things like log usb serial, size, file directories, vol name blah blah blah then depending on criteria eject the usb device. My problem is that my program works 100% when i run it independant of USBDLM [onarrival].

It however works 99% when it runs due to USBDLM [OnArrival] - it does everything EXCEPT eject the drive. Even tho the util i use 'devEject' considers the drive ejected - no error.

My simple and basic understanding is that the service USBDLM is still accessing the USB drive at time of ejection and a 'device is in use' error is happening behind the scenes.

Can i get around this point? I assume that if i can start the autoitscript/exe after the onarrival has finished then i should be gold .. how do i START that script i dont have the foggiest.

If anyone can help that would be great. Thanks alot.

Share this post


Link to post
Share on other sites



May want to search for AutoIt3ExecuteScript on the forum for some possible options.


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

i dunno other then having an always running script :/

Share this post


Link to post
Share on other sites

Hi guys - i resolved my issue.

Which i didnt really - i just did some proper scripting! haha

My orginal problem was a 'share violation' as per process mon (which i knew anyway) with the USBDLM service and the script i was running to eject the drive.

What i ended up doing was having the 'eject' run in a seperate autoit.exe file which i called from the original with a ShellExecute rather then Run or RunWait. In that external eject.exe script i just put a sleep (1000) then the deveject in a runwait()

What that allowed was the USBDLM service to 'release' the usb drive as it has finshed the [onarrival] autoit script i told it to run.

I am sure this would have been very obvious to you peoples - too me not so much - but resolved anyhow.

Thank you both for the quick and helpful responses. Please look to my next thread though as i have new problems!

haha

Thanks again - much appreciated.

Share this post


Link to post
Share on other sites

Well being a newbie... he said what he did but it would be nice to see an example. 'cuz I am havin' problems.

Share this post


Link to post
Share on other sites

Well being a newbie... he said what he did but it would be nice to see an example. 'cuz I am havin' problems.

Understand that but when you are having problem with the script you are working on it is better to create your own thread and ask assistance with it by posting the portion of the code and explaining the problems you are having.

Welcome :)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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