Hi there,
I'm a newbie and I'm trying to rename and HTML file in BBEdit with the value
of a selection (newVar) I made earlier:

Here is the code:

******************
tell application "BBEdit"
        activate
        find "title" searching in text 1 of text document 1 options {search
mode:literal, starting at top:true, wrap around:false, backwards:false, case
sensitive:false, match words:false, extend selection:false} with selecting
match
        find "/title" searching in text 1 of text document 1 options {search
mode:literal, starting at top:false, wrap around:false, backwards:false,
case sensitive:false, match words:false, extend selection:true} with
selecting match
        
        set myVar to selection as string
        set newVar to text 7 thru ((length of myVar) - 7) of myVar as string
        
        
        save text document 1 to {(file "Macintosh HD:Users:Tof:Desktop:BBEDIT
Saves:"), newVar & ".txt"}
        
end tell

******************


The last line is causing a problem, it's probably something very simple but
I just can't get my head around this.

Can any of you help at all?


Many thanks, 

Tof
-- 
View this message in context: 
http://www.nabble.com/Rename-file-with-variable--tp14301326p14301326.html
Sent from the BareBones - BBEdit-Scripting mailing list archive at Nabble.com.


-- 
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to