AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Launch browser with current file

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
bill



Joined: 03 Sep 2010
Posts: 7

PostPosted: Fri Sep 03, 2010 7:19 pm    Post subject: Launch browser with current file Reply with quote

Exec("C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe '%f'").

This doesn't work. How does one launch Firefox, or any browser, displaying the current file?

Thanks.
Back to top
View user's profile Send private message
infimum



Joined: 02 Mar 2008
Posts: 26

PostPosted: Fri Sep 03, 2010 7:41 pm    Post subject: Reply with quote

There is a space between "Program" and "Files" and other places.
Back to top
View user's profile Send private message
bill



Joined: 03 Sep 2010
Posts: 7

PostPosted: Fri Sep 03, 2010 8:06 pm    Post subject: Reply with quote

It is enclosed in quotes. If I name a file it works perfectly. For example,

Exec("C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe c:\links.htm")

But if I use the variable %f enclosed in single quotes it doesn't work. Why not?
Back to top
View user's profile Send private message
bill



Joined: 03 Sep 2010
Posts: 7

PostPosted: Fri Sep 03, 2010 8:11 pm    Post subject: Reply with quote

Sorry. Solved it. Quotes around the variable are not needed. This works:

Exec("C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe %f")
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1263
Location: Poland

PostPosted: Fri Sep 03, 2010 8:44 pm    Post subject: Reply with quote

bill
I think this should be done like this:
Exec(`C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe "%f"`)
or
Exec('C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe "%f"')
Back to top
View user's profile Send private message
bill



Joined: 03 Sep 2010
Posts: 7

PostPosted: Fri Sep 03, 2010 9:03 pm    Post subject: Reply with quote

That is the way I had it initially, double quotes around the complete string and single quotes around the variable. But I find that quotes around the variable are not needed. In fact, using quotes around %f doesn't work.
Back to top
View user's profile Send private message
cnnnc



Joined: 12 Jan 2008
Posts: 116
Location: Shantou, China

PostPosted: Sat Sep 04, 2010 8:30 am    Post subject: Reply with quote

Exec(`"C:\Program Files\Mozilla Firefox 4.0 Beta 3\firefox.exe" %f`)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) 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


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group