ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

[DONE] lightweight pdf viewer and editor

<< < (3/4) > >>

Ath:
Location:  F:\Documents\Paperwork\unreadable-name.pdf perhaps?  :tellme:

tomos:
Location:  F:\Documents\Paperwork\unreadable-name.pdf perhaps?  :tellme:
-Ath (November 07, 2012, 09:41 AM)
--- End quote ---

you mean Adobe couldnt read my screenshot either ??? :D

Nod5:
Try this tomos (I have tested it in Acrobat but not Acrobat Reader)

--- ---#IfWinActive, ahk_class AcrobatSDIWindow
F12::
send ^d  ;open file properties
winwaitactive, Document Properties
ControlGetText, xname, Static2, Document Properties
ControlGetText, xpath, Static18, Document Properties
send {esc}
ifexist %xpath%%xname%
 run [full path to pdf-xchange here] "%xpath%%xname%"
return
#IfWinActiveIf it doesn't work, open Document Properties in Acrobat Reader and also open AU3_Spy that comes with Autohotkey. Hold the mouse over the filename in the properties window and check the ClassNN value in AU3_Spy. Replace Static2 above with that value. Repeat for the file path part of the properties window.

tomos:
Works out of the box :-*

many thanks Nod5 :Thmbsup:

Attronarch:
I think this Autohotkey script will do what you want. Run it and then press F4 (or change it to some other hotkey) when Sumaptra is active to open the same document in nitro. You only need to change [path_to_nitro_folder] to whatever folder you have nitropdf installed in.

Spoiler
--- ---#IfWinActive, ahk_class SUMATRA_PDF_FRAME
F4::
clipsave := ClipBoardAll
clipboard =
send ^d  ;open file properties
winwaitactive, Document Properties
send ^c  ;copy properties
clipwait
send {esc}
RegExMatch(clipboard, "U)File: (.*\.pdf)\R",xpath)  ;put pdf file path in variable
if xpath1 !=
 run [path_to_nitro_folder]\NitroPDF.exe "%xpath1%"
clipboard := clipsave
return
#IfWinActive

edit: fixed regex code and made run conditional on finding a matching pdf file (not epub or any other file type that Sumatra also supports)
-Nod5 (November 05, 2012, 01:16 PM)
--- End quote ---

Thank you for posting this piece of code. Extremely useful, since Sumatra doesn't lock in .pdf files, allowing editing and viewing at the same time.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version