Launch browser with current file
- Author
- Message
-
Offline
- Posts: 7
- Joined: Fri Sep 03, 2010 7:10 pm
Launch browser with current file
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.
This doesn't work. How does one launch Firefox, or any browser, displaying the current file?
Thanks.
-
Offline
- Posts: 23
- Joined: Sat Jun 14, 2014 3:56 am
Sorry for bumping this topic up, can the above firefox path also be used in the "AkelPad.Exec" command?
This the command I used in for the "Scripts" plugin.
I have code below (see "I") that works perfectly with notepad, but if I replace 'notepad.exe' with the full path of another application it does not work.
If I replace 'notepad.exe' with the full absolute path to notepad.exe it also doesn't work.
I looked in the 'Scripts' section in the Plugins help-file but I could not find an awnser there.
Is there a way to use a full path with an argument, using the following 2 variables:
I want to put the above 2 variables in the following line:
This the command I used in for the "Scripts" plugin.
I have code below (see "I") that works perfectly with notepad, but if I replace 'notepad.exe' with the full path of another application it does not work.
If I replace 'notepad.exe' with the full absolute path to notepad.exe it also doesn't work.
I looked in the 'Scripts' section in the Plugins help-file but I could not find an awnser there.
Code: Select all
var hSubClass;
if (hSubClass=AkelPad.WindowSubClass(1 /*WSC_MAINPROC*/, MainCallback, 0x436 /*AKDN_OPENDOCUMENT_FINISH*/))
{
//Message loop
AkelPad.WindowGetMessage();
AkelPad.WindowUnsubClass(1 /*WSC_MAINPROC*/);
}
function MainCallback(hWnd, uMsg, wParam, lParam)
{
if (uMsg == 0x436 /*AKDN_OPENDOCUMENT_FINISH*/)
{
var filePath = AkelPad.GetEditFile(0);
AkelPad.Exec("notepad.exe \"" + filePath + "\"");
}
}
Code: Select all
var msg_txt="Hello!" // this is the argument
var msg_exe="d:\path\to\msg_exe" // this generates a popup
Code: Select all
AkelPad.Exec("notepad.exe \"" + filePath + "\"");
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
r0n
In JScript double backslashes are required: http://www.w3schools.com/js/js_strings.asp
Code: Select all
var msg_txt='Hello!'; // this is the argument
var msg_exe='d:\\path\\to\\msg_exe'; // this generates a popup
AkelPad.Exec('"' + msg_exe + '" ' + msg_txt);