Source language: Translate to:

passing a variable to dialog box

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

passing a variable to dialog box

Postby stevec » Mon Feb 09, 2015 12:47 pm

I'm using a plugin lgaDialogLogin, it contains two variables [PwdBoxUser] and [PwdBoxPwd]

I have following set in the page properties

SetVar "[PwdBoxUser]" "[UserName]"

When I use the action to open the dialog box, the [PwdBoxUser] is blank.

lgaDialogLogin "" "Enter password"

Is there a way to populate the dialog box with the {PwdBoxUser] not being blank?

I have tried the sendkeys, but that does not work.

The input Box would work, but as it is a password there is no option for using ****** to hide the password

Thanks;
Steve
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: passing a variable to dialog box

Postby stevec » Tue Feb 10, 2015 10:06 am

Hi all;

I put on my thinking cap and went through some of the embedded action commands.

I did the following by creating a Custom Window and using the Input Box and two buttons.

Button to open the window********************

SetVar "[PwdBoxUser]" "[UserName]"
CustomWindow "Enter Password" "336" "279" "Group1" "DialogBox+Exclusive"

and the 'OK' Button*******************

DOSCommand "net " "use S: \XXX\XXXX [PwdBoxPwd] /user:XXX\[PwdBoxUser]" "RunOnce+Wait"
CloseCustomWindow "Group1"

******************
now if I can get the Tab/Focus to work on the OK button when the text is put in.
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: passing a variable to dialog box

Postby Neosoft Support » Tue Feb 10, 2015 10:55 am

I'm not familiar with lgaDialogLogin so I can't help with that.

now if I can get the Tab/Focus to work on the OK button when the text is put in.


The problem is knowing when the user is done entering the password. You switch focus to the OK button before they're done entering the password. Instead what you might try is setting the OK button's shortcut key to ENTER. Then they can type the password and press ENTER to continue.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: passing a variable to dialog box

Postby stevec » Tue Feb 10, 2015 11:18 am

Awesome!
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: passing a variable to dialog box

Postby Gaev » Tue Feb 10, 2015 1:01 pm

Steve:

I did a search of this forum for "lgaDialog" ... found this other post from a long time ago ...

viewtopic.php?f=7&t=13447&p=11174029&hilit=lgaDialogLogin#p11174029

... are you sure you want to deploy a plugin that has not been supported by its author for a while now ?

Having said that ...
When I use the action to open the dialog box, the [PwdBoxUser] is blank.
lgaDialogLogin "" "Enter password"
... assuming there is some form of documentation/help info ... what are the two parameters for this command supposed to reference ? ... the first parameter is supposed to be blank ? ... perhaps you can post here what this plugin command is supposed to do for you.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: passing a variable to dialog box

Postby dec » Tue Feb 10, 2015 1:14 pm

Hello,

Gaev wrote:... are you sure you want to deploy a plugin that has not been supported by its author for a while now ?


And, on the other hand, I think NeoBook can achieve a dialog like that using a custom window. ;)

Or am I wrong? :?:
.
Enhance your NeoBook applications!
.
57 plugins, 1113 actions and 230 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: passing a variable to dialog box

Postby stevec » Tue Feb 10, 2015 1:37 pm

Gaev;

the IgaDialog box works. In my continued and ongoing effort to simplify and streamline my work, I was hoping to 'omit' one part of the process of drive mappings, by eliminating the [UserName] typing. Every now and than I get a crazy idea and try and make it work.

Dec;
you're correct. I was able to do it with the Custom Window/dialog box.

Matter of fact, in the Pub files, it says I don't even need the IgaDialog plugin.


I have been tinkering with the idea of trying to figure out how to actually create a plugin, I downloaded the plugin.sdk and a utility called 'Lazarus' thats a Delphi editor.
I haven't come across a decent tutorial on how to create one. I posted another post in the plugin area, in case someone wants go give a few pointers.

Much appreciate the feedback from some of the masters.
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Re: passing a variable to dialog box

Postby Gaev » Tue Feb 10, 2015 2:10 pm

dec:

And, on the other hand, I think NeoBook can achieve a dialog like that using a custom window. ;)
Or am I wrong? :?:
Yes, NeoBook has the native commands and widgets to build something that asks the user for his/her Name and Password value ... or if we wait half a day, dec and his incredible plugin machine will add something similar to lgaDialog into one of his plugins :)
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest