Make a GUI with AppleScript

H i want to make a window with AppleScript, i dont really like the dialog thing.. (Kind of annoying.. :P) is there any way of doing that or is it any program that i can make it with??

You can use AppleScriptObjC in Xcode, or something like CocoaDialog or Pashua.

Similar Messages

  • Make panel visible with Applescript in CS5.5

    Hello all,
    I am looking to make the Separations Panel visible using Applescript in InDesign CS5.5. Just can't seem to locate the correct syntax. All assistance appreciated. Thank you.

    OK, figured it out. Posting in case someone else may need it sometime.
    Wrote a quick script to get panel info and see how they were referenced.
    tell application "Adobe InDesign CS5.5"
              set listPanel to every panel
    end tell
    Then found this snippet to be what was needed.
    tell application "Adobe InDesign CS5.5"
      tell panel "Separations Preview"
        set visible to true
      end tell
    end tell

  • Trying to Access Nike+ Data On The Web With Applescript

    I would love to access this data (see this article on how they are doing it: http://www.shokk.com/blog/articles/2007/01/10/nikeplus-api) but I can't seem to make it work with Applescript by using this command:
    do shell script "curl https://www.nike.com/nikeplus/v1/services/app/externalprofilelogin.jhtml?
    login=\"[email protected]\"&password=\"yourpassword\"&locale=en_us"
    Any thoughts?

    I would love to access this data (see this article on how they are doing it: http://www.shokk.com/blog/articles/2007/01/10/nikeplus-api) but I can't seem to make it work with Applescript by using this command:
    do shell script "curl https://www.nike.com/nikeplus/v1/services/app/externalprofilelogin.jhtml?
    login=\"[email protected]\"&password=\"yourpassword\"&locale=en_us"
    Any thoughts?

  • When I create a new polygon with applescript in in design cs4, I want to make a drop shadow

    when I create a new polygon with applescript in in design cs4, I want to make a drop shadow
    Is it possible?
    I am working with MAC OS 10.6.7 and CS4
    Can somebody help me?

    Adding a drop shadow should work fine regardless of shape… As Im a big fan of using styles everywhere I can…
    tell application "Adobe InDesign CS5"
    activate
    tell the active document
    set GotNoStyle to make new object style
    set properties of drop shadow settings of fill transparency settings of GotNoStyle to ¬
    {mode:drop, distance:3, angle:135, spread:0, blend mode:multiply, opacity:50, honor other effects:true, x offset:3, y offset:3, knocked out:true, use global light:false}
    set SomeFill to the last swatch
    tell the first page
    make new rectangle with properties ¬
    {fill color:SomeFill, geometric bounds:{10, 10, 30, 30}}
    apply object style (the result) using GotNoStyle without clearing overrides
    make new oval with properties ¬
    {fill color:SomeFill, geometric bounds:{10, 40, 30, 70}}
    apply object style (the result) using GotNoStyle without clearing overrides
    end tell
    end tell
    end tell
    You can then edit the object style to make global changes… Sorry my values were for my euro metric head…

  • Can not add function to pages-document created with Applescript

    If I create new document using the GUI (New document) I can place the cursor within any table-cell, type "=" (equal sign) and f.e. "2+2" which will result in a cell showing a "4".
    If I create a document with Applescript, I can not add new functions (neither by typing = nor by using Insert >> Function (may be different, I have German version here). Already existing functions (which already were in the template) can still be used and work as expected but can not be altered.
    Any idea?
    I use Pages '08, Version 3.03
    Code I used to create the document:
    tell application "Pages"
    launch
    make new document at front with properties {template name:templateName}
    # Angebotsnummer ins Dokument schreiben
    tell body text of front document
    make new paragraph at after paragraph 1 with data angebotsNr
    set paragraph style of paragraph 2 to "Überschrift"
    end tell
    # Datei abspeichern
    set dateiName to missing value
    repeat until dateiName is not equal to missing value
    set dateiName to text returned of (display dialog "Datei Name:" default answer angebotsNr & "_" & kundenName) as text
    end repeat
    save front document in angebotsOrdner & dateiName
    end tell

    I apologize but the given script can't run.
    The variable templateName is undefined.
    The variable angebotsNr is undefined too.
    About the described behavior, it's a bug which I never discover before.
    It's always striking in Pages '09.
    Here is the report which I filed :
    Bug ID# 8704270
    Summary:
    +Odd behavior of tables in Pages documents created by a script+
    +Steps to Reproduce:+
    +Run this huge script+
    +tell application "Pages"+
    +make new document at front with properties {template name:"Blank"} (* "Vierge" on French systems *)+
    +end tell+
    +Insert a table+
    +try to insert a formula+
    +Expected Results:+
    +I assumed that I will get the formula editor which I get when the document is created by hand+
    +Actual Results:+
    +There is no way to get the editor, no way to insert the equal character.+
    +This odd behavior strike in all versions of Pages '09 and Pages '08+
    Regression:
    +None to my knowledge+
    Yvan KOENIG (VALLAURIS, France) dimanche 28 novembre 2010 11:30:29

  • Edit Illustrator symbol with AppleScript

    Hello,
    Does anyone know if it is possible to edit an existing symbol in an Illustrator CS3 document with AppleScript? Specifically, what I'm trying to do is this: I'd like to manually create an Illustrator document that uses the "3D Extrude and Bevel" effect to map symbols to the surfaces of the 3D object. Then, I'd like to programatically open that Illustrator document, edit the existing symbols (so the surfaces of the 3D object are updated), and finally export an image.
    From what I've found in the AppleScript documentation PDF, I'm thinking this is not possible since it lists all the properties of a symbol object as read-only. But perhaps I'm overlooking something?
    If it is not possible, is there another way of doing what I'm trying to achieve?
    Thanks!
    Ben

    Ben, could you not have just swapped your symbols? like:
    set symbol of every symbol item to symbol "Foo"
    Justin, if it is essential that you need to crack open a symbol item then it may be possible using system events to expand the item may even be possible with a action for this part?
    This works for me. It is set to work with what items i know are available to my test doc.
    {1 symbol of >2 path items, 2 gradients swatches}
    tell application "Adobe Illustrator"
    activate
    set Doc_Ref to the current document
    tell Doc_Ref
    set x to width / 2
    set y to height / 2
    set ruler origin to {x, y}
    -- Make new layer to trash later
    make new layer at beginning with properties ¬
    {name:"Opened Symbol", visible:true}
    -- Place the symbol item you want to open
    make new symbol item at beginning of layer "Opened Symbol" with properties ¬
    {symbol:symbol 1, position:{0, 0}}
    -- Select the item
    set selection to symbol item 1
    -- Use system events to drive the GUI
    tell application "System Events"
    tell process "Adobe Illustrator"
    tell menu bar 1
    click menu item "Expand..." of menu "Object"
    delay 0.1
    keystroke return
    delay 0.1
    click menu item "Ungroup" of menu "Object"
    end tell
    end tell
    end tell
    -- List your items to edit
    set Symbol_Items to every page item of layer "Opened Symbol"
    -- Edit what ever you have here
    set fill color of path item 1 of layer "Opened Symbol" to {gradient:gradient 1}
    set fill color of path item 2 of layer "Opened Symbol" to {gradient:gradient 2}
    -- New group
    set New_Group to make new group item at beginning of layer "Opened Symbol"
    -- Move edited items into new group
    repeat with i from (count of Symbol_Items) to 1 by -1
    move (item i of Symbol_Items) to beginning of New_Group
    end repeat
    -- New symbol from group
    make new symbol at end with properties ¬
    {name:"My New Symbol", source art:New_Group}
    -- Replace instances
    set symbol of every symbol item to symbol "My New Symbol"
    -- Clean up
    delete every page item of layer "Opened Symbol"
    delete layer named "Opened Symbol"
    delete symbol 1
    end tell
    end tell

  • Create iCal-iCloud calendar with applescript

    I am trying trying to create a new calendar with Applescript in my iCloud account.  I've tried using the following:
    tell application "iCal"
      make new calendar with properties {title:item i of NewCalendars}
                        end tell
    but it creates it On My Mac.  I've tried searching for a way to do this but can't find anything.

    That seems to be possible with GUI Scripting:
    set theTitle to "New calendar"
    tell application "Calendar" to activate
    tell application "System Events" to tell process "Calendar"
        tell menu bar item "File" of menu bar 1
            click menu item "iCloud" of menu 1 of menu item "New Calendar " of menu 1
            -- (don't remove the space at the end of "New Calendar ")
        end tell
        keystroke theTitle & return
    end tell
    Before running the script, don't forget to enable access for assistive devices in the Accessibility System Preference pane.

  • Automated report/ PDF conversion with AppleScript

    Hello-
    I am attempting to PDF a spreadsheet from Dropbox, and email it to a set list of recipients with AppleScript.  Much of this I have been able to figure out, but I am having some issues with the PDF conversion.  As you can see below, I am still working on sending the xls file, and have not yet been able to get AppleScript to convert a specific tab of the file to aPDF.  I expect scheduling to be handled theough crontab.
    Current script is as follows:
    tell application "Finder"
              set folderPath to folder "Macintosh HD:Users:user:Dropbox:folder:Calculated PO Sheet"
              set theFile to first file in folderPath as alias
              set fileName to name of theFile
    end tell
    set theSubject to "Current PO Report" date
    set theBody to "See attached."
    set theAddress to "recipient email"
    set theAttachment to "CALCULATED PO SHEET.xlsx"
    set theSender to "sender email"
    tell application "Mail"
              set theNewMessage to make new outgoing message with properties{subject:theSubject, content:theBody & return & return, visible:true}
              tell theNewMessage
                        set visibile to true
                        set sender to theSender
      make new to recipient at end of to recipients with properties {address:theAddress}
                        try
      make new attachment with properties {file name:theAttachment} at after the last word ofthe last paragraph
                                  set message_attachment to 0
                        on error errmess -- oops
      log errmess -- log the error
                                  set message_attachment to 1
                        end try
                        log "message_attachment = " & message_attachment
      #send
              end tell
    end tell

    Hi,
    there is a special setup for this requirement. Please see the following support note
    Reference
    Oracle Reports Output For Indian Languages Like Gujarati, Marathi [ID 980554.1]
    Roberto

  • How to send a mail as an attachment in a mail with AppleScript?

    Hi,
    I want to manage my spam using the advices found in support.apple website :
    OS X Mail
    Open the message and choose “Forward as Attachment” from the Message menu.
    Forward the message to iCloud [email protected].
    Forward the message again to abuse@domain, replacing domain with the part of the sender's email address after the @ symbol. For example, if the sender's email address is [email protected], forward the message to [email protected].
    I don't know how to make a message as an attachment...
    set theAttachment to theMessage
    make new attachment with properties {file name:theAttachment} at after last paragraph
    Here is my whole script, if it runs, it could be useful :
    tell application "Mail"
      -- envoi les messages sélectionnés en PJ à [email protected]
              set theMessages to the selection
              repeat with theMessage in theMessages
                        set theAttachment to theMessage
                        set newMessage to make new outgoing message at end of outgoing messages
                        tell newMessage
                                  set subject to "Fwd: " & theMessage's subject
      make new to recipient with properties {address:"[email protected]"}
                                  tell content of theMessage
      make new attachment with properties {file name:theAttachment} at after last paragraph
                                  end tell
                        end tell
      send newMessage
              end repeat
      -- envoi les messages sélectionnés en PJ à abuse@<domaine du spammeur>
              set theMessages to the selection
              repeat with theMessage in theMessages
                        set theAttachment to theMessage
                        set newMessage to make new outgoing message at end of outgoing messages
                        tell newMessage
                                  set subject to "Fwd: " & theMessage's subject
                                  set theSpamAddress to theMessage's sender
                                  set AppleScript's text item delimiters to {"@"}
                                  set spamerDomainName to text item 2 of theSpamAddress
                                  set theNewSpamAddress to "abuse@" & spamerDomainName
      make new to recipient with properties {address:theNewSpamAddress}
                                  tell content of theMessage
      make new attachment with properties {file name:theAttachment} at after last paragraph
                                  end tell
                        end tell
      send newMessage
              end repeat
    end tell
    Thank you!

    Perfect!
    You clearly give me the way. Actually I have used the AppleScript Language Guide from https://developer.apple.com to finalize my AppleScript.
    You just need to select the spam message(s) in "Mail" application, then run the script.
    As I mentionned previously, it just do this automatically :
    OS X Mail
    Open the message and choose “Forward as Attachment” from the Message menu.
    Forward the message to iCloud [email protected].
    Forward the message again to abuse@domain, replacing domain with the part of the sender's email address after the @ symbol. For example, if the sender's email address is [email protected], forward the message to [email protected].
    Here is the entire working script :
    -- Ce script permet de lutter contre le spam.
    -- Je me suis appuyé sur les conseils sur http://support.apple.com/kb/TS4019?viewlocale=fr_FR
    tell application "Mail"
              set theMessages to the selection
              repeat with theMessage in theMessages
      -- enregistre le message dans un fichier pour le mettre en PJ ensuite
                        set msgContent to source of theMessage
                        set tmpFile to ((path to desktop) as rich text) & "ForwardedMessage"
                        set referenceNumber to open for access tmpFile with write permission
      write msgContent to referenceNumber
      close access referenceNumber
      -- envoi le message sélectionné en PJ à [email protected]
                        set newMessage to make new outgoing message at end of outgoing messages
                        tell newMessage
                                  set subject to "Fwd: " & theMessage's subject
      make new to recipient with properties {address:"[email protected]"}
                                  tell content of newMessage
      make new attachment with properties {file name:tmpFile} at after last paragraph
                                  end tell
                        end tell
      send newMessage
      -- envoi le message sélectionné en PJ à abuse@<domaine du spammeur>
                        set newMessage to make new outgoing message at end of outgoing messages
                        tell newMessage
                                  set subject to "Fwd: " & theMessage's subject
                                  set theSpamAddress to theMessage's sender
                                  set AppleScript's text item delimiters to {"@"}
                                  set theSpamAddress to text item 2 of theSpamAddress
                                  set AppleScript's text item delimiters to {">"}
                                  set spamerDomainName to text item 1 of theSpamAddress
                                  set theNewSpamAddress to "abuse@" & spamerDomainName
      make new to recipient with properties {address:theNewSpamAddress}
                                  tell content of newMessage
      make new attachment with properties {file name:tmpFile} at after last paragraph
                                  end tell
                        end tell
      send newMessage
              end repeat
    end tell

  • Creating a Save As dialog box with Applescript for Excel 2008

    This is going to be part of a larger script. I'm trying to figure out how to make the default save location to where the file opened from and the default file name to the current filename in the dialog box.
    Here is what I go so far...
    tell application "Microsoft Excel"
    tell active workbook
    set myFile to choose file name with prompt "Save file as:"
    end tell
    end tell
    I'm very new with working with Applescript, so at this point I have been piecing together code snippets.
    Any help would be great and thank you

    The choose file name command supports a default location parameter that tells it where to open the dialog:
    set myFile to choose file name with prompt "Save file as:" default location (alias "Macintosh HD:Users:username:foldername:")
    So you need to look at the Excel dictionary to determine the path to the current file and insert it into the script. Every version of Excel has slightly different dictionaries so the version you're running is critical to getting the right syntax.

  • Export PDF Workflow with Applescript and CS3

    Hello,
    I am setting up some PDF workflow with Applescript.
    On a given moment, as my script runs and after getting some user-input answers to questions in some dialogs, my script tells InDesign CS3 to open the Export Adobe PDF window for the current document. I copied and pasted that small part of the script:
    tell application "Adobe InDesign CS3"
    tell document 1
    export format PDF type to "Macintosh_HD:Test01.pdf" using "somePreset" with showing options
    end tell
    end tell
    When you run this small part of my Applescript, InDesign opens the Export Adobe PDF window (as expected) waiting for me to click on "Export". That is exactly what I want, since the user is given here a last opportunity to change some values (for example page range, or spreads). When all is set, the user can click on Export to close the dialog and finish the script.
    Problem: I was hoping that the Adobe PDF Preset "somePreset" would be selected in the first pull-down menu of the Export Adobe PDF window when this window is opened by the script. Unfortunately the last used preset is always selected by default. Anyone suggestions or help?
    Kind regards,
    Bertus Bolknak.

    My operators enter the page range and filename into a dialog box. Then I set those in the script. I use the Press Quality preset to start with and then set the changes I want into a export variable. I set things like bleed, marks, page range, etc.
    Here is an example:
    set theProps to properties of PDF export preset "[Press Quality]"
    try
    delete PDF export preset "Schmidt PDF"
    end try
    set theStyle to {name:"Schmidt PDF", acrobat compatibility:acrobat 7, bleed top:"0.125i", bleed bottom:"0.125i", bleed inside:"0.125i", bleed outside:"0.125i", page marks offset:"0.125i", include ICC profiles:Include None, effective PDF destination profile:use no profile, effective PDF X profile:"No Color Conversion"} & theProps
    make PDF export preset with properties theStyle
    set properties of PDF export preferences to theStyle
    set color bitmap sampling of PDF export preferences to none
    set grayscale bitmap sampling of PDF export preferences to none
    set page range of PDF export preferences to (item i of myPageList) as string
    export document 1 format PDF type to (PrinergyFolder & myJobNumFinal & "_" & VerCode & ".pdf") as Unicode text without showing options
    I am also doing this in Quark.

  • How to process received images in iChat/Messages with Applescript

    Hello!
    I want to process all received photos or videos with Applescript.
    I try this:
    using terms from application "Messages"
              on message received theMessage from theBuddy for theChat
                        if the length of theMessage is 0 then
      -- it means I received a picture or video file, but I can't get the file with Applescript, because theMessage is an empty string and not a file
                                  set theMessage to "<lost photo or video content>"
                        else
      -- it's OK, I just got a text message and I can now save it or display or do something else with it
                        end if
              end message received
    end using terms from
    But if I receive a photo, theMessage is empty.
    The event handlers "on completed file transfer" and "received file transfer invitation" don't work in this case, probably because it is not a file tranfer, but sort of an inline picture.
    I use OS X 10.8.
    Can somebody help me?

    I have a similar question as well. I tried this for you and nothing happened.
    on received file transfer invitation theFileTransfer
    end received file transfer invitation
    I think "completed file transfer" is regarding to the file being transfered to Apple's Server from your computer when a file is sent, but I'm not sure about "received file transfer invitation." Regarding it being an inline file, maybe try using the attachment class.
    attachment n [inh. rich text] : Represents an inline text attachment. This class is used mainly for make commands.
    elements
    contained by rich text, characters, paragraphs, words, attribute runs.
    properties
    file (file, r/o) : The path to the file for the attachment  syn file name

  • Making and opening folder with applescript

    I'm trying to create and open a folder with applescript, but my script gives an error...
    This is what i've written but can't figure out what i'm doing wrong. I hope you can help me!
    tell application "Finder"
    activate
              set the_folder to "106_WDJZ Eigen Magazine 20pp_Foto"
              set myfolder to make new folder at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:" with properties {name:the_folder}
              set openmap to (myfolder & the_folder)
    end tell
    Thank you very much in advance

    Thank you both for your awnsers. I really appreciate it! I was trying to create a folder (at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:") with a name (106_WDJZ Eigen Magazine 20pp_Foto) and after the folder is created I want the scrpt to open the folder.
    The in FileMakerPro (calculated) applescript is now working and look like this:
    "tell application \"Finder\"" & ¶ &
    "set the_folder to \"" & Editie_standaardgegevens::UitgaveID & "_" & Editie_standaardgegevens::Editienaam_intern & "_Foto" & "\"" & ¶ &
    "set sub_folder to \"Press4:10. Specials:" & Editie_standaardgegevens::Editienaam_intern_totaal & ":F. Foto:\"" & ¶ &
    "set myfolder to make new folder at sub_folder with properties {name:the_folder}" & ¶ &
    "set openfolder to (sub_folder & the_folder & \":\")" & ¶ &
    "open folder openfolder" & ¶ &
    "activate" & ¶ &
    "end tell"

  • How to make simple GUI application that use oracle 9i intermedia

    Mr Lawrence,
    i want to make a GUI application for storing and retrieving image data, can i build this application using delphi?
    i try using borland delphi 7, but delphi doesnt know object type ORDImage and ORDImageSignature. do u have any reference about building GUI application??
    I want my application can do inserting image into database, searching image by matching it's signature, make image signature for query image, displaying image, etc.
    Or if i can't make this application using delphi, maybe u can give me another application developer beside Delphi.
    Please help Mr Lawrence, i'm stuck (T_T)

    I am not too familiar with Delphi.
    If it does Object-Relational types, that could work.
    Can it interface with PL/SQL procedures? If so, that would be the way to go.
    That is what I have done with .NET applications.
    Larry

  • Download image from URL with applescript

    I want to download an image from an website (and internal IP address) using applescript,
    now I have found a script that works (Download jpeg image to folder with AppleScript from URL).
    But, the web page requires a username and password...
    When I convert the downloaded JPEG into a HTML by simply changing the extension, quick look displays the webpage's 401 unauthorized error page...
    Does someone know how to make the applescript input the username and password?

    The answer depends on how the authentication is managed.
    There are two common ways of implementing authentication in web browsers and knowing which one is used here is essential to scripting the request. One is also significantly harder than the other.
    The first (easy) way is that the username and password can be submitted with the request. This is the original model and is easy to script - if you're using the curl model then it's just a matter of adding the -user switch to the command line:
           -u, --user <user:password>
                  Specify the user name and password to use for server authentica-
                  tion. Overrides -n, --netrc and --netrc-optional.
    This model is a little less secure, though, but might still be used on internal sites since it's easy to implement.
    The other option is that the site uses cookies - you log in via a web form and the server gives your cookie which you then send with subsequent requests and are used to validate your access. This is a more secure, but is harder to implement because there is a multi-step process - login via the web form, capture the cookie, submit the cookie with the download request.
    If you're not familiar with the different methods it can sometimes be hard to tell which one you need, and since it's an internal site there's no way anyone else can check... so you'll need to describe how you login to the site (or are prompted for authentication) before anyone can provide a direct answer.

Maybe you are looking for

  • Palm desktop calendar - in month view, event times are in wrong order!

    I use Palm Desktop 4.1.4 on my Windows XP machine (I don't own a PDA). I enter my appointments in Week view and they look fine, but when I go to Month view (I want to print this view), the events for a given day show up in the wrong order! For exampl

  • Specific Application filter while desktop sharing

    I need help for the specific application filter while on desktop sharing. i.e i have to share entire Desktop with current running processe except server application window (UI).http://blogs.msdn.com/b/rds/archive/2007/03/23/writing-a-desktop-sharing-

  • How do I set iCal so that my alarms go off when in sleep mode?

    I'm pretty sure that I can set iCal to open a program (iTunes) as an alarm while the computer is in sleep mode but I can't find the setting. This morning it didn't go off while in sleep mode. Does anyone know how?

  • Feature Request:   Preset Preview on Second Monitor

    Currently, when you have monitor 2 set on "Loupe" mode and it is set for a "Live" view, and then scroll across the filmstrip on monitor 1, you can see the images change on the second monitor. I would like to have the ability to set monitor 2 on "Loup

  • How to apply business rules with out breaking to patch missing data

    Hello Experts, I am very new to SQL And i have no idea how to apply below  rules Data is polling for every 5 minutes so 12 time intervals per hour 6:00  -->1 6:05---->2 6:50---->11 6:55---->12                   6:50---->11 Missing value Patching Rule