Ask dialog when program opens

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Ask dialog when program opens

Post by urbaud » Sun Jun 14, 2009 7:54 am

I'm trying to figure out how to launch an Ask dialog on program start. I don't want the user to have to click on a button to get the dialog. I want the Ask dialog to appear immediately when the program starts so the user can immediately input into the Ask dialog. Can it be done in Revolution? I've been searching in the forums and elsewhere with no luck. Perhaps I just don't know the right words to use in my searches. If someone knows where I can study some code to make this happen, sure would appreciate it. Thanks in advance.
urbaud

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sun Jun 14, 2009 9:22 am

Put this in your stack script:

Code: Select all

on openStack
  ask "How many cookies do you want?"
  answer "You want" && it && "cookies!"
end openStack
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sun Jun 14, 2009 9:40 am

Jan,
on openStack
ask "How many cookies do you want?"
answer "You want" && it && "cookies!"
end openStack
I tried your code and asked for 10 cookies. Rev only gave me 3 and a half. Is that because I use version 3.5?
A good reason to upgrade to version 4 when it is available.

:)

regards
Bernd

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Sun Jun 14, 2009 11:13 am

Hi Bernd,

looks like you have to fill your Rev cookie-account first!
For our convenience Rev has put up a webiste to do it online:
http://www.runrev.com/user-accounts/cookies

:-D :-D :-D

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sun Jun 14, 2009 12:42 pm

too bad, that site said 404, cookie not found.

They ran out of cookies. What a pitty.

You know what: I will ask Heather from customer support. That seems the only one who can help at this point.

She is always very responsive and helpful.

regards

Bernd

urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Ask dialog when program opens

Post by urbaud » Wed Jun 17, 2009 1:48 am

Hi Jan,

Thank you for the code. It works fine. I didn't think it would be such a small amount of code.

Thanks again,
Dan
urbaud

Post Reply