Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6

Thread: Dialog Problems

  1. #1
    Join Date
    Mar 2005
    Posts
    103

    Huh? Dialog Problems

    I was doing something for my cousin, Amber, an di wanted to put in this popup. but when I run the program in "program.exe" /AMBER, nothing happens. Am I missing something? The program initializes, but then nothing happens.

    Here is the code I put in the Global Functions:
    Code:
    bamberMode = false;
    local nNumArgs = Table.Count(_CommandLineArgs);
    if(nNumArgs > 0)then
    	for i,strArg in _CommandLineArgs do
    		if(strArg == "/AMBER")then
    			bamberMode = true;
    		end
    	end
    end
    
    if(bamberMode)then
    amberclick = Dialog.Message("Hello Amber", "Hi amber. How are you? do like this. hehehe", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    if(amberclick == IDOK)then
    Application.ExitScript();
    	end
    end

    Thanks for any help.

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    I put your code into an empty SUF70 project's On Startup event. It worked fine when I passed it the /AMBER setting. What version of SUF70 do you have?

  3. #3
    Join Date
    Sep 2004
    Posts
    60
    Quote Originally Posted by rctshine
    Here is the code I put in the Global Functions:
    SNIP

    Thanks for any help.
    Global Functions is used for functions to be called from your code. The code you put there will not run because it is not a function and hasn't been called from any other code.

    Paste your code into the startup section like Brett did and it will work fine.

  4. #4
    Join Date
    Mar 2005
    Posts
    103
    Thanks, you were right. Wrong section. hehehe.

    Sometimes my stupidity suprises myself.

  5. #5
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by Absynthe
    The code you put there will not run because it is not a function and hasn't been called from any other code.
    To avoid some misunderstanding:
    It is possible to have actions in the Global function area. The 'Global actions' are executed BEFORE actions On Startup. You can have local functions wherever you want, but the function must be defined BEFORE it is called. Functions/actions in 'Gloabal' are read by both the setup procedure and the uninstaller.

    I think rctshine has used the code in Bret's great Debug script as a template, and the code was placed in the 'Global Functions' area. I copied rctshine's code into Global and it worked as expected. But why do you have the Application.ExitScript() command?

    rctshine, I don't see your "stupidity"?
    Last edited by csd214; 03-23-2005 at 01:04 PM.

  6. #6
    Join Date
    Sep 2004
    Posts
    60
    Quote Originally Posted by csd214
    To avoid some misunderstanding:
    It is possible to have actions in the Global function area. The 'Global actions' are executed BEFORE actions On Startup. You can have local functions wherever you want, but the function must be defined BEFORE it is called. Functions/actions in 'Gloabal' are read by both the setup procedure and the uninstaller.

    I think rctshine has used the code in Bret's great Debug script as a template, and the code was placed in the 'Global Functions' area. I copied rctshine's code into Global and it worked as expected. But why do you have the Application.ExitScript() command?

    rctshine, I don't see your "stupidity"?
    csd214 is correct, sorry for the misinformation

Similar Threads

  1. file browse dialog causes problems?!?!?!
    By gnetcanada in forum AutoPlay Media Studio 5.0
    Replies: 6
    Last Post: 12-16-2004, 08:46 PM
  2. 2 Problems creating a backup menu!
    By frim in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 02-27-2004, 01:26 PM
  3. Displaying a Save As Dialog
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-01-2003, 03:53 PM
  4. Using the Status Dialog Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:52 PM
  5. MDAC dialog box pops up. How to remove it ?
    By weld in forum Setup Factory 6.0
    Replies: 0
    Last Post: 12-11-2002, 07:14 AM

Posting Permissions

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