codemorphis.com Forum Index codemorphis.com
Software development: pure and simple.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Application Interface Component Start App Service

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum
View previous topic :: View next topic  
Author Message
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Sun Aug 21, 2005 3:32 pm    Post subject: Application Interface Component Start App Service Reply with quote

When using the application interface component start app service, and specifying the iexplore.exe program it is necessary to put a space and two quotes in front of the website one is loading. An example is:

C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE ""http://www.codemorphis.com

without the quotes the site will not load -- not even the browser will launch.

I hope this is helpful to anyone writing automation softare with the Synopsis tool.
Back to top
View user's profile Send private message Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Mon Aug 29, 2005 2:09 pm    Post subject: Reply with quote

This problem has been corrected. It was due to a mishandling of the enclosing quotes for application paths and arguments that contain spaces.

If you want to specify a path such as:

C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE

that contains embedded spaces, you need to enclose the path with quotes like this:

"C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE"

Same goes for arguments that contain spaces.

In 1.1.9, specifying quotes with application arguments was incorrectly handled and following your example, the path created was:

"C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE http://www.codemorphis.com"

which caused the Application Interface component to consider the whole line as the application to start (with no arguments). Since the path does not exist, nothing happens on the call to "Start app".

The correct call generated should be:

"C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE" "http://www.codemorphis.com"

This has been corrected and will be in the next update.

Thanks for finding and reporting this and kudos for your great workaround. Your workaround works because by specifying:

C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE ""http://www.codemorphis.com

Synopsis winds up wrapping the command with quotes (since they were not specified), giving the correct call command:

"C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE ""http://www.codemorphis.com"
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Tue Aug 30, 2005 5:49 pm    Post subject: Start App Service Reply with quote

As always I look forward with eager anticipation to the next Synopsis update, and it will be a snap to 'find/replace' any changes needed to comply with the next update.

While my ego profusely thanks the Codemorphis team for the "kudos for your great workaround" comment, I must admit that it was purely dumb luck, because I was simply trying any and everything to get the component service to work via trial and error.

The Launch Program component works great with arguments, and no odd quote placements are needed, but when automating applications -- the PID's are necessary. I was working with the IBM ManageNow problem record ( trouble ticketing/management ) application, and needed four of them running with distinction for automation purposes. They all have the exact same window title -- even though four different queues are loaded thanks to static html title tags, so the Start App service of the Application Interface Component was the component I needed to get switching capablility.

The Synopsis tool is too good to be true, even with a mild annoyance here and there.

Go Team Codemorphis!!!
Back to top
View user's profile Send private message Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Wed Aug 31, 2005 9:14 am    Post subject: Reply with quote

The reason why you don't need to supply quotes for paths that contain spaces when using the Launch Program component is because the file path and command arguments are supplied through separate input data ports.

With the "Start app" service of the Application Interface component, the entire file path and arguments are supplied through one argument. This difference in handling of file targets and command arguments is due to the underlying Windows function calls that are made. The Windows API call used by the Launch Program component allows you to separate file target from arguments, whereas the Windows API called used by the Application Interface does not.

In your example with the Application Interface component:

C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE http://www.codemorphis.com

if we do not wrap the file target with quotes then because of the space in the path the intepretation becomes:

File path: C:\Program Files\Plus!\Microsoft
Argument 1: Internet\IEXPLORE.EXE
Argument 2: http://www.codemorphis.com

So you need to specify it as:

"C:\Program Files\Plus!\Microsoft Internet\IEXPLORE.EXE" http://www.codemorphis.com

This behaviour is similar to that in a DOS window shell, for example. When you type in an incomplete file path that matches one that has a contained space and then hit Tab to request file path completion, you will see that DOS wraps the entire file path with quotes.

Hope this helps.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Mon Nov 07, 2005 5:18 pm    Post subject: Reply with quote

This has been corrected in 1.1.10
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum All times are GMT - 5 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group