Normal Topic @PromptForUserInput (Read 4030 times)
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
@PromptForUserInput
Dec 24th, 2004 at 2:34pm
Print Post Print Post  
When using @PromptForUserInput the user must first click on the line in the window before typing the entry.
Is there any way to throwfocus to this line?
I'm trying to aoid having the user manipulate the mouse.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @PromptForUserInput
Reply #1 - Dec 24th, 2004 at 3:16pm
Print Post Print Post  
@PromptForUserInput sets the focus initially on the buttons (and allows the programmer to set an initial default value) so that users can accept or reject the default value with either one or two keystrokes.

Focus can be moved to the text input area with either the mouse or with the tab key or with the arrow keys.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: @PromptForUserInput
Reply #2 - Dec 24th, 2004 at 3:27pm
Print Post Print Post  
While the example in the manual has as a default value the name of the alternate printer, it seems to me that the concept is for there not to be a default value.
In my case I'm asking the user to input a last name.
It would be helpful if the focus were to start in the text box, or if I could drive it there through the program.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @PromptForUserInput
Reply #3 - Dec 24th, 2004 at 8:54pm
Print Post Print Post  
Suggestion noted. Thanks for the feedback!  Smiley Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: @PromptForUserInput
Reply #4 - Dec 24th, 2004 at 9:50pm
Print Post Print Post  
While you're working on that, here's another.
All of my program runs from a menu composed of command buttons.
I don't yet have a good idea on running Backup Application.
I'd like to be able to input the path for the backup, perhaps in a @PromptForUserInput box and then be able to have the program enter that value in the filename line of the "Select a Drive and Directory......" window.
Thanks for all your hard work, 1.1 is great.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @PromptForUserInput
Reply #5 - Dec 25th, 2004 at 5:41am
Print Post Print Post  
[quote author=addison1  link=1103898855/0#4 date=1103925051]I don't yet have a good idea on running Backup Application.[/quote]

Here's a good solution for backing up an application from a command button.
[code]var success as Int
var MacroFile as string

//The @Application command provides the name from the top of the application menu,
//so this code is useable in any application without modification.

success = @SelectTreeItem(@Application + "!Application Utilities!Backup Application")

// The following code is used instead of the @Application command, to protect the backup
// copy of an application in the event that the original is copied to a new filename, but
// used for different data, and the application name was not changed in the new copy.

if success = 1 then
     {
     MacroFile = @repllas(@fn, "\", "\Backup ")            // Insert "Backup "
     MacroFile = @repllas(MacroFile, ".db", "")            // Delete ".db"
     @macro(MacroFile + ".mac")
     }
[/code]
This code can be used in multiple applications without any modification. The only other thing you need to do, is record a custom macro for each application to go along with this code.

To record the macro open your application:
1) Select [i]Backup Application[/i] from the application utilities menu. (You should now see a window where you select a filename to use. Don't click anything just yet.)
2) Turn macro recording ON by pressing Shift-F2.
3) Click in the [i]Filename[/i] text box.
4) Press the End key to make sure the cursor is at the end of the text that is already there.
5) Type in the filename you want for your backup copy.
6) Click on Accept.
7) Turn macro recording OFF by pressing Shift-F2.
8) Save your macro in the same folder as the application itself (usually C:\Sesame\Data\), using this format for its name: Backup AppFilename.mac
Note that AppFilename should be the application's FILE name (as seen by the operating system), NOT the name that appears at the top of the application menu tree.

Now you will have a seamless, simple, one-click way to backup your application.

Let me know how you make out.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: @PromptForUserInput
Reply #6 - Dec 25th, 2004 at 4:42pm
Print Post Print Post  
Carl,
The key piece was the ability to turn the Macro recorder on and off with the shift F2 keys. I knew that I needed a macro but the focus was in the wrong place to pull down the macro menu.
After step 4 in the instructions you might want to say something like .... "Delete what's there using the backspace key"
Thanks for the help, Merry Christmas!
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @PromptForUserInput
Reply #7 - Dec 26th, 2004 at 2:01pm
Print Post Print Post  
Quote:
After step 4 in the instructions you might want to say something like .... "Delete what's there using the backspace key"

You shouldn't delete it. It's only the path to the data folder (Sesame doesn't display any previously used filename in the text box). You should simply need to enter the filename after that path.

If you do delete it, the backup file will end up in the main "C:\Sesame" folder rather than the "C:\Sesame\Data" folder. (Unless that's what you want.)
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: @PromptForUserInput
Reply #8 - Dec 26th, 2004 at 2:22pm
Print Post Print Post  
addison1,

I have been assuming that you want your backup copy in the same folder as the original app. If you want to put your backup copy on a different drive, then you could backspace over the default path that is there, and type in the complete path and filename for your backup location.

I let all my backup copies go to the same "C:\Sesame\Data" folder as the originals, then I backup the entire Sesame folder and sub-directories to a Jaz drive using a batch file I have on my Windows desktop.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: @PromptForUserInput
Reply #9 - Dec 26th, 2004 at 6:28pm
Print Post Print Post  
I'm having the customer do a backup to an external drive that he can take home with him. Just another way to differentiate my design from the stuff he's used to dealing with.
Thanks for both thoughts
Fred
  
Back to top
 
IP Logged