Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2006
    Posts
    77

    Using 'extitscript' script

    I want to know how Application.Exitscript works.

    For example File.Find("C:", "*.txt") was fired by some button (OnClick). And I want to stop it by clicking on another button. So I tried to to use Application.Exitscript on 'OnClick' action but it didn't stop 'find' action. What is more, during that action is performed Aplication.Exit script doesn't work till it ends. So then if I want to close my application I have to terminate it (kill process).
    So how should I use works Application.Exitscript ?

  2. #2
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    have you tried the help file yet>?

  3. #3
    Join Date
    Sep 2006
    Posts
    77

    help useless in this case

    Ofcourse I did. But there is simply written that 'exitscript' ends currently performed action. Nothink more...
    Any other suggestions?

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Application.ExitScript() is used to break out the current function or action. You can't use it to break out of another objects actions. For your scenario, in your callback function, check a variable to see if the cancel button was pressed, if so, then break out.

  5. #5
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    Exit script will exit out of the event that it was fired from. You cannot exit one script from another. Your best bet would be to use the Callback function to cancel out of that action.

    In that case you could set up a callback function in "Global Functions" that checks a variable and decides to continue searching based on that value. Then you could have another button that sets that variable.

    Adam Kapilik

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Neener, neener, neener... I was faster than you


    Quote Originally Posted by Adam View Post
    Exit script will exit out of the event that it was fired from. You cannot exit one script from another. Your best bet would be to use the Callback function to cancel out of that action.

    In that case you could set up a callback function in "Global Functions" that checks a variable and decides to continue searching based on that value. Then you could have another button that sets that variable.

    Adam Kapilik

  7. #7
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    I'm feeling some "ownt" love.

    Intrigued

  8. #8
    Join Date
    Sep 2006
    Posts
    77

    no idea

    Generally I don't understand an idea of this solution at all. Maybe because of my ignorance...
    What should I write in 'global'?
    Could you show me any example?
    I'm newbie in AMS...

    Adam Kapilik? Your name sounds like you'd come from middle europe. Do you?

  9. #9
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    Neener, neener, neener... I was faster than you
    Great minds think alike

    Global Functions:

    Code:
    keepgoing = true;
    
    -- A function that accepts two values and returns one value
    function caller(CurrentPath)
    	-- Put function script here
    	local path = CurrentPath;
    	
    	if keepgoing then
    		return true;
    	else
    		return false;
    	end
    end
    File.Find():

    result = File.Find("C:\\", "*.pdf", true, false, caller, nil);
    Button to stop the file.find():

    Code:
    keepgoing = false;

    Adam Kapilik? Your name sounds like you'd come from middle europe. Do you?
    Third generation Canadian. The name originates in Czech/Poland

    Adam Kapilik

  10. #10
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Third generation Canadian.
    Also known as 3rd Gen iCanadian.


    Intrigued

  11. #11
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    Also known as 3rd Gen iCanadian.
    Sounds like the latest console system. You should see the controller..

    Adam Kapilik

  12. #12
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by Adam View Post
    Sounds like the latest console system. You should see the controller..

    Adam Kapilik
    lol........
    Intrigued

  13. #13
    Join Date
    Sep 2006
    Posts
    77

    thx

    ...because I come from Poland .
    Actually I wrote a proper script with myself before I saw your help (thank you very much) and now I see it's very easy. Now I see that it was a stupid question too.

    M@ngomel

Similar Threads

  1. Problem with TrueUpdate.GetServerFile
    By Richard L in forum TrueUpdate 2.0
    Replies: 0
    Last Post: 06-26-2006, 03:54 AM
  2. File Script Condition: Throws error, what is up?
    By Woofster in forum Visual Patch 2.0
    Replies: 3
    Last Post: 02-16-2006, 05:18 PM
  3. .NET 1.1 Dependency Script Questions
    By drpepper in forum Setup Factory 7.0
    Replies: 1
    Last Post: 01-03-2006, 02:04 PM
  4. Script Editor Pane?
    By rraisley in forum AutoPlay Media Studio 6.0
    Replies: 18
    Last Post: 09-23-2005, 04:08 AM
  5. How can I know the FS Command name of a movie???
    By yoske in forum AutoPlay Media Studio 5.0
    Replies: 27
    Last Post: 01-01-2005, 10:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts