Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2019, 08:45 AM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
"Open with..." with a switch, how to?

I want to proccess a .xhtml file from Sigil with external program but I also want the file will be open (externally) with a command option and the "Open with..." dialog doesn't allow me to do that. How must I procced in those cases?

Thanks in advance.
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 10:19 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Create an executable batch file or link and add command line option inside of that.
KevinH is offline   Reply With Quote
Advert
Old 08-13-2019, 10:55 AM   #3
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
Create an executable batch file or link and add command line option inside of that.
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 12:24 PM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
I made a bat file with the following command:

MyProgram.exe -u %1

and I saved all as "MyBat.bat". If I drop a .xhtml file on that .bat, all works fine but if I want to proccess a .xhtml file with the same .bat by means of "Open with..." nothing happens. What am I doing wrong?
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 02:07 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Is MyProgram.exe on your PATH?

I'm able to use the following in a batch file on Windows 10 and pass the /p parameter to EditPadLite (to open in Print Preview) and have it work with Open With.

Code:
"C:\Program Files\Just Great Software\EditPad Lite 7\EditPadLite7.exe" /p %1
DiapDealer is offline   Reply With Quote
Advert
Old 08-13-2019, 02:54 PM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
Is MyProgram.exe on your PATH?
No it isn't. But the .bat file is in the same folder of MyProgram.exe (with a different name of the .exe file).

But now I'm suspecting it can be a bug. I made a .bat file with the following line:

c:\windows\notepad.exe %1

The path wouldn't be neccesary because notepad.exe is in the Windows folder, but even so, I wrote the path to notepad in the .bat. Well, after selecting with "Open with..." that .bat file, the .xhtml didn't open inside Notepad (nothing happened). But, if instead of using the .bat, I open the .xhtml file directly with Notepad (throught Open with), the file is open without issue.
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 03:04 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by RbnJrg View Post
No it isn't. But the .bat file is in the same folder of MyProgram.exe (with a different name of the .exe file).
Doesn't really matter with the way the detached process is launched by Qt. You're better off supplying the full path to your exe in your batch file.

Quote:
But now I'm suspecting it can be a bug. I made a .bat file with the following line:

c:\windows\notepad.exe %1

The path wouldn't be neccesary because notepad.exe is in the Windows folder, but even so, I wrote the path to notepad in the .bat. Well, after selecting with "Open with..." that .bat file, the .xhtml didn't open inside Notepad (nothing happened). But, if instead of using the .bat, I open the .xhtml file directly with Notepad (throught Open with), the file is open without issue.
It can't be Sigil bug, because I'm able to do exactly what you want to do with a batch file on Windows. In fact your exact example:

c:\windows\notepad.exe %1

in a batch file works to open xhtml files from Book Browser in notepad on my Windows machine.

Last edited by DiapDealer; 08-13-2019 at 03:15 PM.
DiapDealer is offline   Reply With Quote
Old 08-13-2019, 03:59 PM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
It can't be Sigil bug, because I'm able to do exactly what you want to do with a batch file on Windows. In fact your exact example:

c:\windows\notepad.exe %1

in a batch file works to open xhtml files from Book Browser in notepad on my Windows machine.
How weird! Maybe is something with my Windows 7. I tried with others text editor (Notepad++, Sublime) and I can't open the .xhtml by means of a .bat with "Open with...". But if I drop a .xhtml file on the .bat file, the .xhtml is loaded perfectly (so, the .bat is ok).
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 04:03 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'll test on Windows 7 when I get home to make sure it's not some sort of 10 vs 7 thing.

But rather then testing by dropping files on the batch file, try running it from a terminal and providing the path to the xhtml file as a parameter. That will more closely approximate how Sigil will be launching things.
DiapDealer is offline   Reply With Quote
Old 08-13-2019, 04:48 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Hmmm. I get the same results you do on Windows 7. I'll have to do some investigating.
DiapDealer is offline   Reply With Quote
Old 08-13-2019, 04:56 PM   #11
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
But rather then testing by dropping files on the batch file, try running it from a terminal and providing the path to the xhtml file as a parameter. That will more closely approximate how Sigil will be launching things.
The .bat works perfectly from a terminal. So, the .bat file is ok.
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 04:59 PM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by DiapDealer View Post
Hmmm. I get the same results you do on Windows 7. I'll have to do some investigating.
Well, something that is working on Windows 10, it doesn't do it on Windows 7.
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 05:16 PM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
perhaps it needs something else to launch it. It was a long way back but I remember a command called "start" that was needed to launch certain filetypes but ...
KevinH is offline   Reply With Quote
Old 08-13-2019, 06:15 PM   #14
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
perhaps it needs something else to launch it. It was a long way back but I remember a command called "start" that was needed to launch certain filetypes but ...
I tried with "start" and doen't work either But the weird thing is that on Windows 10 Diap says that all work perfectly (without the command "start").
RbnJrg is offline   Reply With Quote
Old 08-13-2019, 07:00 PM   #15
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Hmm the only other things I remember was usung the first line to set the drive

so something like:

c:
c:\windows\notepad.exe %1

and then renaming it from .bat to .cmd but that is the limit of my knowledge.

DiapDealer is really the expert here. Perhaps he can figure out what is different between Windows 7 and Windows 10 here.

Sorry.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Kindle Dx Graphite with corrupted software, does not switch to "registered" wincel Amazon Kindle 26 10-03-2020 11:05 AM
Alter Double-click behaviour to "edit metadata" instead of "open ebook?" Feather_Qwill Library Management 5 09-15-2013 11:20 AM
How to remove "Fully read" books from "Last Open" list? pjeanetta PocketBook 4 12-08-2010 10:30 AM
"Liquid" / "Fixed" - how to switch layouts Alexander Turcic Announcements 0 06-05-2007 09:29 AM
Sony Connect "Bait and Switch" Advertising? TheMooch Sony Reader 5 02-21-2007 01:43 AM


All times are GMT -4. The time now is 06:02 PM.


MobileRead.com is a privately owned, operated and funded community.