AppleScript error-1700
Help, please. I want to write the apple script that will do something, if there is a number greater than 100 in website vk.com
When I run the script it brings this: error "can't convert true in many classes, date or text." number-1700 "
number, date, or text with a.
Thank you very much!!
Here is the error code.
the language is Russian =)
set
You can be sure that the source code of any web page will contain a lot of numbers greater than 100.
My guess is that you're just trying to promote the Russian website "vk.com/twaan.
Tags: Mac OS & System Software
Similar Questions
-
Anti-spam reporting AppleScript for Mail broken in OS 10.7 + (error-1700)
I use the following e-mail spam related AppleScript of KnujOn everyday:
(* Cf. http://www.macosxhints.com/article.php?story=20060219014940761 *)
(* RS 31 July 2006 *)
Set theSpamAuthority to "[email protected]".
(* or your personal Knujon address *)
Tell application "Mail".
Set theMessages to the selection
Repeat with thisMessage in theMessages
Set newMessage make new message coming out at the end of outgoing messages
tell newMessage
the visible value to true (* comment on the line to stop windows 'flashes' *)
define the content of the source of thisMessage
subject to the value "Fwd:"& thisMessage's subject.
brand new to recipient with properties {address: theSpamAuthority}
tell the end
Send newMessage
set read status of thisMessage to true
together been forwarded of thisMessage to true
status of thisMessage spam set to true
end repeat
tell the end
This script worked perfectly for many years on Mail 2 for 10.4 Tiger and 4 mail for Snow Leopard 10.6, exactly as shown above. I'm fighting to move to a new Mac with a new version of OS X I have two: an iMac running OS 10.7.5 Lion with Mail 5.3 and a MacBook Pro OS 10.10.5 Yosemite with Mail 8.2. These two systems are unable to exactly in the same way, with the same error:
"error" Mail was an error: cannot make the source of the message id box 2182618 mailbox \"INBOX/Junk Mail\ ' \"SS IMAP\ account ' type rich text. ' number-1700 of the source of the message id box 2182618 mailbox account "SS IMAP' rich text ' box of RECEPTION/Junk Mail"
This happens with the word "content" in the line of script "set content to thisMessage's source" highlighted.
I studied the AppleScript dictionaries for mail in these different versions of the OS (10.6, 10.7 and 10.4, 10.10):
For Mail 2 on Tiger, source and content are the two 'string. ' String is not defined.
For Mail 4 in snow, source and content are the two "text". Text is defined as "Rich (style) text.
Mail 5 in Lion and 8 Mail in Yosemite, source is 'text' and the content is 'Rich text', defined as 'Rich (style) text.
"Aha!" I thought: ' I need to force the Mail to use plain text to the message form! After days and hours learning (I don't know AppleScript) and experimentation, I finally got the following change to the compilation and tried to run (my changes/additions in bold):
Tell application "Mail".
Set theMessages to the selection
Repeat with thisMessage in theMessages
Set newMessage make new message coming out at the end of outgoing messages
Tell application "system events" to indicate the process of "Mail".
frontmost set to true
Click on the menu "make Plain Text" of the bar menu 1 to menu bar "Format" menu 1 item
tell the end
tell newMessage
the visible value to true (* comment on the line to stop windows 'flashes' *)
define the content of the source of thisMessage
subject to the value "Fwd:"& thisMessage's subject.
brand new to recipient with properties {address: theSpamAuthority}
tell the end
Send newMessage
set read status of thisMessage to true
together been forwarded of thisMessage to true
status of thisMessage spam set to true
end repeat
tell the end
Note that I voluntarily deleted the emitting part and setting of the script at the end (I want to ensure that any changes properly format the message before it shuts down in fact).
Result: same error at the same place.
I checked that the incomplete outgoing e-mail form indeed is set to plain text.
Here's how things are supposed to work:
(1) user manually selects one or more spam messages in Mail, and then calls the script.
(2) for each selected message, the Mail + script creates a new outgoing email message. The body of the message is the raw source of the message spam (inbound). The subject is set to Fwd: + the original subject line. To: address is as shown in the script. Send (from :) address is the user's default in mail.)
(3) each message individually, marked as read, marked as forwarded, marked as spam.
(Note: I tried to paste in formatted AppleScript, but this web form mixed and makes it unreadable.)
I don't know what else to do. I need to this feature, every day! The lack of it crashes me to move to a new version of the OS.
Hoping someone has a solution,
Sonic())
Sometimes it takes separate getting properties various - try this:
set content to (get thisMessage's source)
-
AppleScript Error-1728 - failed to get document 1
I'm trying to find out why my AppleScripts I use for automation of numbers do not work this month.
I have several scripts that I built for the treatment of the expenditure reports and I ran them last time in February with no problems. Whenever I now them I get the following error message:
error "Numbers had an error: failed to get document 1." the document number-1728 1
I looked at this post: https://discussions.apple.com/message/29854515#29854515
I have not found the cache file listed in the directory of ~/Library/Caches... ask yourself where the hell numbers may be sticking this file in order to remove it and see if this solves my problem.
All I have this problem or knows where I could find the file cache for numbers?
Thank you
Rich
To solve this problem...
I had to remove the container file to ~/Library/Containers/com.apple.iWork.Numbers and my scripts are back and working again!
-
AppleScript error, I do not understand why its happening
Wrote a script that will convert color im black-and-white photos. I wrote it at home on cs 5.1 and it worked perfectly, but when I got it to work on a version of cs6 there bugged. again the code below works on 5.1, but by operating at work he gets into convertpics() photoshop Manager errors.
It errors on changing the fashion line. When it is running I get the word highlight snd mode "expected end of line, etc., but found identifier." (also), he doesn't seem to like the use of the Document 1 or current document.in the other lines? That's how I / m he writes that the dictionary/synatax has changed. (I couldn't find Ant difference). This is my brain race because for me, there's no scene. Help!
Global picfolder
Global origimages
say application 'Finder '.
the value MyHome to (path to the folder) as string
the value picfolder to MyHome & "Documents: Dark Side:
if (there are (file picfolder)) then
movePics() picfolder) of me
on the other
do new folder at 'Documents' with properties of MyHome & {name: 'Dark Side'}
end if
the value myPath to (path to the folder) as string
end say
-a test to see if the files already exist-
-a test to ensure that the original files are still there-
on movePics() picfolder( )
say application "Adobe InDesign CS5.5.
tell document 1
the value linkList to path of the file of links
Repeat with LinkNumber from 1 to number of linkList
set DocImage to the point linknumber of linkList
say application 'Finder '.
copy file docimage to the file picfolder
end say
end Repeat
end say
convertpics() picfolder) of me
end say
end movePics
on convertpics() picfolder( )
say application "Finder" to set origimages to files of entire contents of the folder picfolder
Repeat with j’ai en origimages
the value oneImage to j’ai as string
say application "Adobe Photoshop CS5.1.
Open file oneImage
change mode of document 1 . to Grayscale
set fname to the name of the document as current string
set myFile to picfolder & fname & "_BW"
Save { active document in file myFile like TIFF BOM with options { }:Mac OS stir:fake image compression of the color profile to the:LZW record alpha:falsechannels save layers:false} adding extension lowercase
Close current document without saving
end say
end Repeat
end convertpics
I tried this part in Photoshop CS6, OSX 10.10.4 and it works well.
say application "Adobe Photoshop CS6.
Open file oneImage
change mode of 1 the document in Grayscale
tell the end
-
Why Adobe's script docs as with Illustrator wave on the open Applescript file?
Since the script reference to Applescript, to Adobe's Illustrator (I believe is the same for other products too), I see snippets of example code as:
on openFile (fileToOpen)
Tell application "Adobe Illustrator"
activate
Open fileToOpen POSIX file as an alias with options
tell the end
end openFile
Why does he leave us to understand the value of fileToOpen (String)? Understandable that there's specific Applescript, but it's more work for those of us unfamiliar Applescript to do more research.
Is 'as alias' really necessary? I have problems with that. Omitting "as alias" gets Applescript error: "Adobe Illustrator has been an error: AppleEvent Manager failed." Keep 'as alias"results error saying that it cannot create alias path, which, for some reason, looks like it's in the Applescript path even if specified as POSIX format (e.g.": ~: Documents: Temp:someFile.ai "instead of" ~ / Documents/Temp/someFile.ai ").
Tried the simple example
Open the POSIX file "~ / Documents/Temp/someFile.ai".
as well as
the pfile value ' ~ / Documents/Temp/someFile.ai ' as a POSIX file
Open the pfile no options file
the value pfilepath ' ~ / Documents/Temp/someFile.ai '
the pfile POSIX file pfilepath value
Open the pfile as alias without options
nothing seems to work so far. Such a pain.
That's kind of what I mentioned... she needed a file object
-
Photoshop Remote scripting via SSH
I'm trying to get AppleScript scripts to run on a remote server by SSH (using the osascript command line utility). However, whenever I try to do nothing more, I get various Photoshop and/or AppleScript errors that I never get when you try to run the scripts from same exact locally. At the end of the day, I'm trying to run a JavaScript JSON of Applescript arguments passing, called by SSH file. Please forgive the verbosity introduced by the simple initial example.
Server: OS X 10.8.5
Photoshop: CC 2014
I see the same type of errors that I have SSH into a server and do the following manually into a shell after logon, or a ssh command to directly run the power supply (e.g., ssh user@host "osascript /path/to/script.scpt"). From a basic example, I tried to launch the following AppleScript snippet. I tried to enter in osascript handmade via stdin, as writing to a file and call it remotely. Both resulted in no new files being created, but a success message.
Tell application "Adobe Photoshop CC 2014"
make new document
tell the end
No matter how I try to execute it remotely, I get the 'untitled document' response to osascript, and Photoshop displays a dialog error: "Could not complete your request because of a program error."
More specific to what I'm trying to do, I have the following code:
Tell application "Adobe Photoshop CC 2014"
time-out of 30 seconds
do javascript("/path/to/local/file.js") with arguments ({"{\"json\"": \"document\",...}) »})
end time-out
tell the end
When I try to run it locally, I never have a problem. But when I run ssh (again, either from the command line or when placing order directly to ssh), I always get the following:
script error: expected end of the line but found identifier. (- 2741)
In addition to osascript stop with this error, Photoshop also appears the same dialog error: "Could not complete your request because of a program error."
Anyone has any suggestions or ideas regarding how I can get all this work?
Thank you
Brian
I was able to work around this limitation by using a daemon on the local host. However, it would be nice if I could finish with this piece of code server...
Thank you
Brian
-
AppleScript record in paper assets error/problem
Hello community,
I have a problem showing my AppleScript an error during execution.
Error: 'Microsoft Word' ACE has detected an error: "active document" can´t read. ' number-1728 in the active document
Word version: Word 2016 Home & Business for Mac
Code:
tell application "Microsoft Word"
active
open "OSX_El_Capitan:Documents:Header:MyHeader.dotx"
set theDoc to active document
tell theDoc
insert file at text object of bookmark "test" file name "OSX_El_Capitan:Documents:Template:DocTemp"
save in "OSX_El_Capitan:Documents:My Save Name.docx"
end tell
end tellScripts ceased online "save in..." and marked with this line.
The other parties on "save in" work.
I don't know if it is maybe an active document of problem.
Thank you
You can't save in a text string. You must save to a file.
For example:
game dittos to POSIX file ' OSX_El_Capitan/Documents/My Name.docx save' as alias
Save to file
-
AppleScript come into conflict with the constant "error" iTunes and "double".
In AppleScript, the key word 'error' is a reserved word. Unfortunately iTunes also defines a constant named "error used as a possible value for example status track iCloud. For example the code such as:
If the status of aTrack cloud is equal to then purchased
Set tCloudStatus to "purchased".
Otherwise, if the status of aTrack cloud is equal to matched then
Set tCloudStatus to 'match '.
Otherwise, if the status of aTrack cloud is equal to then downloaded
Set tCloudStatus "downloaded".
Otherwise, if the status of aTrack cloud is equal to unacceptable
Set tCloudStatus to "ineligible."
Otherwise, if the status of aTrack cloud is equal to then removed
Set tCloudStatus "retired".
Otherwise, if the status of cloud of aTrack is equal to double then
Set tCloudStatus "duplicate".
Otherwise, if the status of aTrack cloud is equal to the subscription then
Set tCloudStatus to "subscription".
Otherwise, if the status of cloud of aTrack is equivalent to is no longer available then
Set tCloudStatus to "is no longer available.
Otherwise, if the status of cloud of aTrack is equivalent to not downloaded then
Set tCloudStatus "not downloaded".
Otherwise, if the status of aTrack cloud is equal to the error
Set tCloudStatus to "error".
on the other
tCloudStatus the value "unknown".
end if
Fails again to save as he complains about the use of ' mistake ". There is also a similar problem with 'double' (which is also a term AppleScript).
Does anyone know how I can force the code to use iTunes sense of these terms, and not the sense of AppleScript? I tried 'implementing 'iTunes' use' but that has not solved the problem.
Thanks for the pointers...
Chris
ATrack If cloud
on the other
the value tCloudStatus to 'unknown '.
end if
Try using:
tCloudStatus aTrack cloud status value as string
(142604)
-
I'm new to applescript, and I am trying to debug a great script. I kept getting an error so I created a simple applescript to test:
Tell application "Adobe Photoshop CC 2015"
the value CheminMonFichier alias "Macintosh HD:Users:mike:Desktop:test_files:test.tif"
Open CheminMonFichier in the TIFF
tell the end
but I get always an error. Any ideas what's happening?
BTW, I use El Capitan on a MacBook Pro, not 10.6.7 10.11.4.
-
About applescript syntax error
Code:
my itermExec1()
on itermExec1()
say application iTerm2
Set newWindow to (create the window with the default 'yeongjun' value)
end say
end itermExec1
It is this script run the ' iterm 2'. (reference. ( https://iterm2.com/applescript.html)
Why is syntax error? Please
Thank you
I can't read the error, but you left on the keyword 'profile '.
-
Satellite 1700-300: Win ME - invalid system disk - ERROR F3D failed
Hello
I have a Toshiba Satellite 1700-300 on windows Millennium Edition. Haven't used for a few years, but when I'm past it the other day the screen says: invalid system disk. I put in my laptop recovery disk, but he cut in halfway through with the message: ERROR F3D failed.
Not really sure what I'm doing and really can't afford a new!
Help would be thank you very much!
Nice discussion on this error, you can find on http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=1255
To be honest, I also think that there is a problem with the HARD drive.
-
An error in this Applescript that I can't understand
Hi, I searched some forums and found this script below which I modified. It works great except for a single statement:
runScript If = 1 then number error -128 I want the script to do is, when a USB drive is mounted and is in the ignoredVolumes as "USB Untitled" I want the script to stop. What I can't understand is, runScript is set to 1, "Untitled USB" Monte, runScript is not changed, why don't the script stops with an error "user cancelled"? On the other hand, if a key USB Monte is not in the ignoredVolumes, runScript is set to 2 and copy the file I want it. What hurts? It's probably something that will be very obvious when I see the answer.
Thanks for any help with this problem,
Mike.
property ignoredVolumes: {'10,10 30 1. 5 't', 'files 1. 5 't', "Untitled USB"} - add if necessary
property videoExtensions: {"avi", "mov", "mpg", "wmv", "mp4" and "mkv"}
the value newVolume to the alias (POSIX file "/ Volumes/files 1.") ("5T / new")
the value oldVolume to the alias (POSIX file "/ Volumes/files 1.") ("5T / old")
game runScript to 1
tell application "System events".
the value rootVolumes to disk (POSIX file ' / Volumes ' in the text)
the value allVolumes to name of every element of disc of rootVolumes
the value numofallVolumes to the County of allVolumes
Repeat with the present book in allVolumes
say application 'Finder '.
if (the present book is not in ignoredVolumes and (this book as text) is not '. ') DS_Store') then
if there are alias (POSIX (' / Volumes / "& the present book) as text file ) then game runScript to 2
runScript If = 1 then number error -128 - it does not give a 'User cancelled' error when "Untitled USB" is mounted
runScript If = 2 then
try
duplicate (elements whose name is in the videoExtensions extension) in alias (POSIX file (' / Volumes / "& the present book &" / new ") as text) to newVolume
on error number errorNumber errorMessage
_error value of errorMessage
_errorNum the value to errorNumber
If errorNumber is -15267 then
display the dialog box "This file already exists in folder a." buttons {"OK", "No"} default button 1 with the title "Film copy error?" giving upwards after 10
If the returned button of result is 'No' then
Error number-128
on the other
If the result is 'OK' or back button gave up lead and then of
eject the present book
display the dialog box "U S B D r i v e E j e c t e d - K O t o R e m o v e" {"no need to click on this button"} default button 1 button give up after 5
return
end if
end if
end if
end try
Try
duplicate (elements whose name is in the videoExtensions extension) in alias (POSIX file (' / Volumes / "& the present book &" / old ") as text) to oldVolume
on error number errorNumber errorMessage
_error value of errorMessage
_errorNum the value to errorNumber
If errorNumber is -15267 then
display the dialog box "This file already exists in the folder B" buttons {"OK", "No"} default button 1 with the title "Film copy error?" giving upwards after 10
If the returned button of result is 'No' then
Error number-128
on the other
If the result is 'OK' or back button gave up lead and then of
eject the present book
display the dialog box "U S B D r i v e E j e c t e d - K O t o R e m o v e" {"no need to click on this button"} default button 1 button give up after 5
return
end if
end if
end if
end try
display the dialog box "USB key will Auto Eject in 10 seconds or click OK... "buttons button 1 with the title"copy Complete - Eject? "default {'OK', 'No'} which gives after 10
If the returned button of result is 'No' then
Error number-128
on the other
If the button returned of result is "OK" or gave up a result then ejection of the this book
display the dialog box "U S B D r i v e E j e c t e d - K O t o R e m o v e" {"no need to click on this button"} default button 1 button give up after 5
end if
end if
end if
end say
end Repeat
end say
The way in which your external block If is currently based, the script can't do anything when this book is in the ignoredVolumes, it can not yet test the runScript value. Try something like this:
If the present book is in the ignoredVolumes then
game runScript to 1
on the other
if (the present book as text is not '. ') DS_Store') then
if there are alias (POSIX (' / Volumes / "& the present book) as text file ) then game runScript to 2
end if
end if
Of course, you need to remove a "end if' the end of the script.
-
Hi all
I'm writing an applescript script which is called with a variable and then use that variable in the script. For example:
on run argv set a to item 1 of argv tell application "iTerm-2" tell current window tell the current session write text "ssh" & a end tell end tell end tell end run
There is something fishy's going on with the open with - command args and AppleScript. I suggest that you run your application as follows to capture item 1 of argv:
osascript mypp.app machine
-
Syntax error in AppleScript, written at Automotive Search + 4 zip code
I am very interested to find and install a script or a 'code' any that would allow me to enter an address and when I go to insert the zip code, it was automatically filled in with + 4 part of the postcode. It's a generally available information to this web page: https://tools.usps.com/go/ZipLookupAction! input.action
The problem is looking for every contact I have add and there are several, is just a tedious task of many steps which should be a pretty easy solution for the 'writing' "applescript" to understand. I'm not a programmer and basically just need someone to take a look at this code and see where I might have a problem. This code is provided by a person for me and unfortunately, they assured me that it worked with previous versions of the application contact for the previous operating system - it seems not however, with the new application 'Contacts' work.
After talking with a few different apple consultants who are not able to help or simply not have the time, I thought that I could join the community and see if I could win any help or support.
Please see the code below-
I have it saved as a script from apple and am aware that this belongs to be saved in one of these two files, once it works correctly:
/ Library/Application Scripts/com.apple.AddressBook
or
/ Library/Application Support/AddressBook /.
Here's the Script:
-code postal locator
using terms from application "Contacts".
on action property
return "address"
end action property
on the action title of p with e
If the zip of e contains "-" then
return "This ZIP Code.
on the other
return 'ZIP + 4 Lookup'
end if
end action title
We should allow action for p with e
If e zip does not contain "-" then
Returns true
on the other
return false
end if
end should allow an action
perform in action for p with e
the value LookupURL ¬
"https://tools.usps.com/go/ZipLookupAction!" input.action"& Street e &"& address2 = & city ="& ¬"
City of e & "& status =" & State e & "& & urbanCode = & postalCode = & zip = '
Tell application "Safari" to open location LookupURL
Returns true
end to perform action
Two things:
(1) you have Contacts in 'Smart' quotes Remove them and replace them with normal double quotes.
(2) you need, end up using phrases of the declaration at the end of the script.
---- zip code locator using terms from application "Contacts" on action property return "address" end action property on action title for p with e if zip of e contains "-" then return "Zip Code Present" else return "ZIP + 4 Lookup " end if end action title on should enable action for p with e if zip of e does not contain "-" then return true else return false end if end should enable action on perform action for p with e set LookupURL to ¬ "https://tools.usps.com/go/ZipLookupAction!input.action" & street of e & "&address2=&city=" & ¬ city of e & "&state=" & state of e & "&&urbanCode=&postalCode=&zip=" tell application "Safari" to open location LookupURL return true end perform action end using terms from
-
Trying to upgrade the computer to windows 7 and got this error
Hello
It depends on if the manufacturer of your computer/laptop has windows 7 drivers available for him as to if it will work properly
check with them
and read this
Windows 7 upgrade advisor
http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=1b544e90-7659-4BD9-9e51-2497c146af15
Windows 7 system requirements
http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements
Windows 7 upgrade paths
http://TechNet.Microsoft.com/en-us/library/dd772579 (WS.10) .aspx
_____________________________________________________________
and the link below is the Forum of installation of Windows 7 for questions about installing Windows 7
http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_install?page=1&tab=all
Maybe you are looking for
-
Comprehensive detection of time
Hi all I recently updated my logical X to the latest version and I found a tool that I used often when demoing new material is missing. Previously, I record my audio tracks scratch and use Edition/Tempo/Detect Tempo Global (or something close to that
-
A thief can remove a device to find my phone without the icloud password?
My ipad was stolen and I have it marked as 'lost mode' in icloud find my phone. A month later, I see that the device is disappeared from my icloud account? The device had an access code, but it was a simple because my children use it. My question is,
-
How to connect my Satellite C650 TV with a HDMI cable?
Connect my laptop with my TV? I have satellite C650 laptop that is not that old, but ive connected my laptop to the TV using a HDMI cable and it does not work. The TV is a samsung 1080 p one, I would be grateful for some advice. Thank you very much C
-
P1102w: connect wireless for mac
Last week, I got a wireless connection between my iMac and my laserjet P1102W printer, but it was disconnected so far. I followed all the instructions on the pdf user guide, but they do not work. Thank you
-
What are updates of the best material for my desktop hp pavilion a6622f PC to rock diablo 3 this winter