Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Problems with Shell command.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-27-2009, 04:33 PM
Newbie
 
Join Date: May 2007
Posts: 5
Default Problems with Shell command.

Hi.

I've been trying to create a simple mobile application that does the equivalent of the Run dialog you get on the PC when you press WindowsKey+R. The idea is to launch this dialog from a hardware button on a PPC or speed dial entry on a Smartphone.



But I'm having some issues.

1. I can only launch actual programs, not associated documents, let alone URL's.

2. If I type bogus stuff, my error handler is totally ignored on the Device. On the Desktop, I do get the appropriate error message.

Are these fixable? (Attached is my source code.)
__________________
System specs:
Desktop: Pentium 4 3Ghz, 2GB RAM, XP Professional SP3.
Pocket PC: HP iPAQ 910c, Windows Mobile 6.1 Professional.
Smartphone: HTC Shadow 2009, Windows Mobile 6.1 Standard.

Last edited by RCC2k7 : 03-27-2009 at 04:56 PM.
Reply With Quote
  #2 (permalink)  
Old 03-28-2009, 05:55 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I've modified your program to first check if the file exists and then if the file's extension is not ".exe", it will find the right launching application from the registry.
The actual file will be passed as a parameter.
Attached Files
File Type: sbp MobileRun.sbp (3.3 KB, 30 views)
Reply With Quote
  #3 (permalink)  
Old 03-28-2009, 10:26 PM
Newbie
 
Join Date: May 2007
Posts: 5
Default

Thanks Erel. I appreciate you taking the time to look at my code. For program design reasons, I still had to alter your code, since it wasn't allowing for direct execution of built-in Windows programs, such as entering just "notepad" instead of requiring "C:\Windows\Notepad.exe" or entering just "notes" instead of requiring "\Windows\Notes.exe".

Still, not only you gave me the code I needed to launch associated documents, but you also gave me some pointers on how to parse the input, so I think I can now get the code to process URL's too.
__________________
System specs:
Desktop: Pentium 4 3Ghz, 2GB RAM, XP Professional SP3.
Pocket PC: HP iPAQ 910c, Windows Mobile 6.1 Professional.
Smartphone: HTC Shadow 2009, Windows Mobile 6.1 Standard.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
return codes of a shell command pmu5757 Questions (Windows Mobile) 18 06-15-2008 07:33 PM
Shell command J12345T Questions (Windows Mobile) 2 06-08-2008 09:49 AM
Questions on shell command, and user event, and the 6.30 dan kabestan Questions (Windows Mobile) 2 05-15-2008 06:45 PM
Help on Sqlite Update Command jeterry Questions (Windows Mobile) 13 03-31-2008 08:45 AM
How to find out that Shell command has finished petrbury Questions (Windows Mobile) 6 10-16-2007 07:20 PM


All times are GMT. The time now is 04:05 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0