Re: Applescript to change line breaks ?

2018-08-14 Thread Bernardo
Thank you Chris.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Applescript to change line breaks ?

2018-08-13 Thread Bernardo
I fogot to say that is for BBEdit 9.6.3

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Applescript to change line breaks ?

2018-08-13 Thread Bernardo
OK, I reply to myself. It works with:

set docList to every text document
> repeat with doc in docList
> tell doc to set line breaks to DOS 
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Applescript to change line breaks ?

2018-08-13 Thread Bernardo
Hello,

I'm trying to create an Applescript to change open documents line breaks to 
DOS (CRLF), so I wrote:

on processOpenDocs()
> repeat with thisDoc in documents
> tell thisDoc to set line breaks to DOS
> end repeat
> end processOpenDocs
>

But it throws an error telling "Unix" is an undefined constant (I tried 
with Mac or Unix with the same result).
Can anybody tell me what I am doing wrong?

Thank you.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search, start at top and other things

2018-01-22 Thread Bernardo
Thanks John.
This version works :)

property startAtTop : true
property wrapAround : false
property caseSensitive : false
property matchWords : false
-

tell application "BBEdit"
- set prev search string
set prevSearchString to current search strings
try -- prev search string not always exists
set prevSearchString to search string of prevSearchString
on error
set prevSearchString to ""
end try
 perform search
set theChoice to display dialog "Search current document for:" default 
answer prevSearchString
if button returned of theChoice is "OK" then
set searchOpt to {starting at top:startAtTop, wrap around:wrapAround
, backwards:false, case sensitive:caseSensitive, match words:matchWords}
tell window 1
set findRes to find text returned of theChoice options 
searchOpt with selecting match
if findRes's found is false then beep
--set search string of current search strings to findRes -- 
seems useless
end tell
end if
end tell



-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search, start at top and other things

2018-01-22 Thread Bernardo
Thanks for your reply, John.
Unfortunately, Applescript editor complains about an expected end of line 
on the word "search" at the first line... I don't know why.

>
> *set* PREV_SEARCH_STRING *to* current search strings
>
>*set* PREV_SEARCH_STRING *to* search string *of* PREV_SEARCH_STRING
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search, start at top and other things

2018-01-20 Thread Bernardo
OK, I found this applescript that could do the job but, as I'm a total 
applescript newbie, I don't know how to retreive the last search string 
(the one which populate the built-in search dialog). This prev search 
should replace in the following PREV_SEARCH_STRING script.

Thanks for your help.


(*
> This Applescript lets you do a search starting at the top of the current 
> document, NOT where the cursor is currently positioned
> Author: Ryan Wilcox
> Date: June 17, 2014
> License: Public Domain
> *)
>
> tell application "BBEdit"
> set theChoice to display dialog "Search current document for:" default 
> answer PREV_SEARCH_STRING
> 
> if button returned of theChoice is "OK" then
> set searchOpt to {starting at top:true, wrap around:false}
> set oldSearchString to text returned of res
> tell window 1
> set findRes to find (text returned of res) options searchOpt 
> with selecting match
> if findRes's found is false then beep
> end tell
> end if
> end tell
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search, start at top and other things

2018-01-19 Thread Bernardo
Don't you think a checkbox for "Start at top" in the Search/Replace dialog 
would be more convenient?
Live Search is great, but it's another kind of Search.


Le jeudi 18 janvier 2018 18:37:36 UTC+1, Rich Siegel a écrit :
>
> On 1/18/18 at 11:49 AM, issa...@gmail.com  (Bernardo) wrote: 
>
> >So, it is no longer possible to seach a documlent directly from its top? 
>
> You can still do so - the "Start at Top" option is gone, but you can: 
>
> - press Command-up-arrow to jump to the beginning of the 
> document before searching; 
>
> - use "Find All" to find all occurrences in the document, and 
> then select the first occurrence in the result list; 
>
> Live Match, and highlighting matches of the selected text will 
> also search the entire document from the beginning. 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
> <sie...@barebones.com >  <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they 
> sedate me. 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: Search, start at top and other things

2018-01-18 Thread Bernardo
Concerning start searching at top in the frontmost document, I performed 
this search before my first post but only found users asking the same 
feature.
I just did a new search without finding any workaround, only the "Wrap 
around" option, which is different.
Some users say to look into an option in the Search dialog, but they are 
old posts, with the old modal dialog.

So, it is no longer possible to seach a documlent directly from its top?

Than you.

Le mercredi 17 janvier 2018 14:50:07 UTC+1, Rich Siegel a écrit :
>
> On 1/17/18 at 7:24 AM, issa...@gmail.com  (Bernardo) wrote: 
>
> >I loved to use cmd-F to start searching *from the top* of the 
> >document, wherever insertion point is. With old versions, I remember 
> >this advanced setting could be use: defaults write 
> >com.barebones.bbedit FindDialog:RememberStartAtTop -bool YES but it no 
> >longer seem to work :( 
> > 
> >Modal dialog for search/replace text was also very convenint. There is 
> >no way to have this option again, like in old versions? 
>
> It's a pretty dead issue. If you search the list archives for 
> "start at top" you can see the discussion, which includes 
> workable alternative strategies. (Do note that the option to use 
> the modal dialog went away in BBEdit 10.0.) 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
> <sie...@barebones.com >  <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they 
> sedate me. 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Search, start at top and other things

2018-01-17 Thread Bernardo
Just upgraded BBEdit from 9.6 to 12... Lots of nice features, but 
searching/replacing text aren't now convenient!

I loved to use cmd-F to start searching *from the top* of the document, 
wherever insertion point is. With old versions, I remember this advanced 
setting could be use:
defaults write com.barebones.bbedit FindDialog:RememberStartAtTop -bool YES
but it no longer seem to work :(

Modal dialog for search/replace text was also very convenint. There is no 
way to have this option again, like in old versions?

Another very anoying thing: I'm using several Clipping sets and I can't 
figure how to display *only one* *set* in a clipping palette (instead of 
having all clippings in a huge palette). Clippings management was more 
convenient in 9 version.

Thank you.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.