Re: ql-manage script not working
Re: ql-manage script not working
- Subject: Re: ql-manage script not working
- From: Axel Luttgens <email@hidden>
- Date: Sat, 02 May 2015 12:31:14 +0200
> Le 2 mai 2015 à 04:13, Kevin Prometheus Trotsky a écrit :
>
> Hello,
>
> […]
> 1. In 10.9 you could run the script and it would open the file ql-manage and then double clicking would open it in the native app, this no longer works in 10.10, it just closes the ql-manage
> 2. 10.9 you could qlook many types of files, and now it only works for jpegs and PDFs, but won’t open them when you click.
> 3. When we try and view Microsoft files, .doc, xls, xlsx it just spins, in 10.9 this was no problem.
> 4. It also looks different than launching it from the Finder. When launching quicklook from the finder you see a clean window that has a share button, document name, and open with””. this script runs and the buttons are gone and it has [DEGUG] at the top.
>
> […]
>
> `set p to POSIX path of "/private/var/folders/2p/v0tsd6xn5rsg7j60ccb3js500000gs/T/S10.2/PI(OCTA)SHIPPING COST(2015.01.22).doc"
> do shell script "qlmanage -p " & quoted form of p
Hello Kevin,
It seems Quick Look has encountered problems under 10.10 to 10.10.2; some bugs have been corrected with 10.10.3, but command qlmanage still has problems with some plugins: BOOTSTRAP_NOT_PRIVILEGED errors and, as you have described it, a somewhat clunky GUI interface.
I guess you should submit a bug report.
In the meantime, since Quick Look appears to behave rather fine in 10.10.3’s Finder, you’ll find hereafter a UI scripting attempt to make use of it:
on qlmanage(filePath)
local fileAlias, qlWins0, qlWins1
set fileAlias to (POSIX file filePath) as alias
tell application "Finder"
activate
reveal fileAlias
end tell
tell application "System Events"
tell application process "Finder"
set qlWins0 to windows whose subrole is "Quick Look"
repeat with k from 1 to 10 -- Avoid infinite loops
keystroke space
delay 0.2
set qlWins1 to (windows whose subrole is "Quick Look")
if length of qlWins1 > length of qlWins0 then exit repeat
end repeat
repeat
delay 0.2
set qlWins1 to windows whose subrole is "Quick Look"
if length of qlWins1 ≤ length of qlWins0 then exit repeat
end repeat
end tell
end tell
end qlmanage
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden