KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Shell - Demonstration script for the System.Shell function

 
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting
View previous topic :: View next topic  
Author Message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 9:35 pm    Post subject: Shell - Demonstration script for the System.Shell function Reply with quote

Creating a seperate thread for this script:


shell.kix
 Description:
shell.kix

Download
 Filename:  shell.kix
 Filesize:  2.59 KB
 Downloaded:  1886 Time(s)

Back to top
View user's profile Send private message
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Fri May 05, 2006 10:16 pm    Post subject: Reply with quote

Nifffffffty
_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
OwenJ
KiXforms Follower
KiXforms Follower


Joined: 14 Jan 2007
Posts: 19
Location: Alton, Hampshire, England (UK)

PostPosted: Tue Mar 13, 2007 12:45 am    Post subject: Oh perveyer of god-like scripting! Please help! Reply with quote

Shawn! help!
The script that I have created, is going to be used for a few utils at home.
This script is going to run a database compiler, (EXE), for my software.

I have done the hard part, I'm sure, but I just can't get over this headbanger.

Here is the section of code I need help with:
Arrow Dim $fname
Arrow $fname = $txtFile.Text
Arrow SHELL 'cmd /c "DBCOMP.EXE" + "$fname"'
Arrow $txtCommandLineCommand.Text = $System.Shell($txtFile.Text,,3)

The problem being that the shell command does not work. If you open up the script i attach, you can select the browse button and select a file. Which you will also notice puts the filename into the textbox at the top of the screen.
But I can't for the life of me pick up the file name.

I am new to the shell commands, so bare with me, and the KIXforms help file is a bit hazey Razz

Here is the following command I would like to replicate in the SHELL command:
DBCOMP.EXE [filename]

Once the above is run, the main window, "$txtMainWindow", should display the command prompt details. As you can tell this is a modification to your script example. and would appretiate any help you can give me.



KIXDB.kix
 Description:
File that I can't get to work.

Download
 Filename:  KIXDB.kix
 Filesize:  4.67 KB
 Downloaded:  1512 Time(s)


_________________
Owen Johnson. aka |SirianKnight| Shocked
Back to top
View user's profile Send private message Send e-mail MSN Messenger
danilda
KiXforms Follower
KiXforms Follower


Joined: 20 Jul 2007
Posts: 16

PostPosted: Wed Aug 01, 2007 2:59 pm    Post subject: Reply with quote

try this:

shell "%comspec% /c dbcomp.exe " + $fname
Back to top
View user's profile Send private message
Marty
KiXforms Novice
KiXforms Novice


Joined: 22 Aug 2008
Posts: 1

PostPosted: Sat Aug 23, 2008 11:45 pm    Post subject: Shell demo converted to Vbscript Reply with quote

Great example thanks. As I'm 'forced' to work with vbscript I converted the code as a learning exercise and am contributing it back in the hope it helps others.

Cheers

Marty



shell.vbs.txt
 Description:
System.Shell demo code in vbscript

Download
 Filename:  shell.vbs.txt
 Filesize:  2.83 KB
 Downloaded:  1404 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group