Click radio button with Apple Script
I have something like this going on at the moment:
tell application "Adobe Reader"
activate
end tell
tell application "System Events"
tell process "Adobe Reader"
click menu "file" of menu bar 1
click menu item "Print..." of menu "file" of menu bar 1
click radio button "pages" of window "Print"
--click button "Printer..." of window "print"
--click menu button "PDF" of window "Print"
--click menu item "Save as PDF…" of menu 1 of menu button "PDF" of window "Print"
--keystroke "D" using {command down, shift down}
--keystroke "G" using {command down, shift down}
end tell
end tell
How do I click the radio button "Pages" in the print dialog box under "pages to print" with applescript?
Thanks
I ended up using key codes to tab using control down to get to it, which works for me.
Similar Messages
-
Change Processor Speed with Apple Script?
Can I use AppleScript to change the Processor Speed in System Preferences/Energy Saver pane?
The background is that my PowerBook G4 is quite noisy when it's running on the highest speed. This is okey during the days but on the evenings and nights I want it silent (but still on), so instead of changing this manually I'm thinking of a Script to trigger this.
Please help. :o)Hi Andreas
yes this can be done using a bit of gui script, the script supplied can be saved as a "application, run only" and activated say from iCal or cron.
"3" is Lowest, so just change the "3" in this line
click menu item 3 of menu 1 of pop up button 1 of tab group 1 of window "Energy Saver"
to 2 or 1 "2" is Highest, "1" is Automatic
and then re-save the script with another name and activate it to change your settings back to where you started.
tell application "System Events"
if not (UI elements enabled) then set UI elements enabled to true
tell application "System Preferences"
set current pane to pane "com.apple.preference.energysaver"
tell application "System Events" to tell process "System Preferences"
set frontmost to true
click radio button "Options" of tab group 1 of window "Energy Saver"
click pop up button 1 of tab group 1 of window "Energy Saver"
click menu item 2 of menu 1 of pop up button 1 of tab group 1 of window "Energy Saver"
delay 0.5
tell application "System Events"
if (name of processes) contains "System Preferences" then tell application "System Preferences" to quit
end tell
end tell
end tell
end tell
Budgie -
Cannot click radio buttons after Windows Updates
Hello,
We approved the following Office updates back in December and since then, our users cannot click radio buttons in Word documents. This month, we pushed all updates stated in the following article:
https://support.microsoft.com/en-us/kb/3025036
We've also removed .exd files from users' computers and this still hasn't resolve our issue. This is critical for us as we use these documents across the entire organization. Please help!
I've tested this both on Office 2013 click-to-run and Office 2010 with the same results. 2013 is the latest version and I've deleted .exd for this as well, using Fix It, script and manually.
Update for Microsoft Excel 2010 (KB2589348) 32-Bit Edition
Update for Microsoft Excel 2010 (KB2889935) 64-Bit Edition
Update for Microsoft Lync 2013 (KB2899507) 32-Bit Edition
Update for Microsoft Office 2010 (KB2553140) 32-Bit Edition
Update for Microsoft Office 2010 (KB2589386) 64-Bit Edition
Update for Microsoft Office 2010 (KB2597089) 32-Bit Edition
Update for Microsoft Office 2010 (KB2687275) 64-Bit Edition
Update for Microsoft Office 2010 (KB2837602) 64-Bit Edition
Update for Microsoft Office 2010 (KB2883019) 32-Bit Edition
Update for Microsoft Office 2010 (KB2889818) 32-Bit Edition
Update for Microsoft Office 2010 (KB2910896) 32-Bit Edition
Update for Microsoft Office 2013 (KB2837654) 32-Bit Edition
Update for Microsoft Office 2013 (KB2881008) 32-Bit Edition
Update for Microsoft Office 2013 (KB2889857) 32-Bit Edition
Update for Microsoft Office 2013 (KB2899493) 32-Bit Edition
Update for Microsoft Office 2013 (KB2899510) 32-Bit Edition
Update for Microsoft Office Outlook 2007 Junk Email Filter (KB2899525)
Update for Microsoft Office Outlook 2007 Junk Email Filter (KB2920789)
Update for Microsoft Office PowerPoint 2007 (KB2597972)
Update for Microsoft OneDrive for Business (KB2899513) 32-Bit Edition
Update for Microsoft OneNote 2010 (KB2597088) 32-Bit Edition
Update for Microsoft Outlook 2013 (KB2899504) 32-Bit Edition
Update for Microsoft PowerPoint 2010 (KB2878251) 64-Bit Edition
Update for Microsoft PowerPoint 2010 (KB2880517) 32-Bit Edition
Update for Microsoft Visio 2013 (KB2899497) 32-Bit Edition
Security Update for Microsoft Excel 2010 (KB2910902) 32-Bit Edition
Security Update for Microsoft Office 2007 suites (KB2596927)
Security Update for Microsoft Office 2007 suites (KB2920790)
Security Update for Microsoft Office 2007 suites (KB2920792)
Security Update for Microsoft Office 2010 (KB2553154) 32-Bit Edition
Security Update for Microsoft Office Excel 2007 (KB2984942)
Security Update for Microsoft Office Word 2007 (KB2899527)
Security Update for Microsoft Office Word 2007 (KB2920793)
Security Update for Microsoft Word 2010 (KB2899519) 32-Bit EditionHi
I have downloaded The toshiba Value added package and most of the 30 odd items have downloaded and installed but the following error messages occured
Intel Display Driver ~~ FAILED
AMD Display Driver ~~ FAILED
ATI HDMI Audio Driver ~~ BAD URL
RealTek Ausio Driver ~~ BAD URL
Intel Wireless LAN Driver ~~ BAD URL
Synatics Touch Pad Driver ~~ FAILED
Toshiba Virtual Added Package ~~ BAD URL
Toshiba System Driver ~~ BAD URL
Toshiba Function Key ~~ BAD URL
Toshiba ECO Utlility ~~ BAD URL
All of the other items downloaded satisfactorily
Can you advise me what steps to take now please as the FN key which was my original question still no longer works
Many Thanks -
Radio Button with Submit Ready Only problem
Hello,
My radio button with submit ready only condition doesn't work correctly. When I click the a link on the first page
it brings me to an update page. I have a radio button with submit, that won't open as a read only.
It is being populated by SQL query, with the Null option selected. When I open the page I don't want the user to be able to edit the field unless they delete records associated with the field. Pretty much I want it to be disabled if the user has a record associated with it.
Here are the queries.
Source:
SELECT OPLAN_IMPACTED_I
FROM DFCY
WHERE DFCY_SEQNO = :P12_DFCY_SEQNO
Read only condition:
SQL Exists query
SELECT o.dfcy_seqno
FROM oplan_impactd o, dfcy d
WHERE o.dfcy_seqno = :p12_dfcy_seqno
and :P12_OPLAN_IMPACTED_I = d.OPLAN_IMPACTED_I
and :P12_OPLAN_IMPACTED_I = 'Yes'
So when the page renders it's like you can change oplan, how do I make it read only when the page renders?
Thanks,
MaryHi,
If that is the source of the radiogroup, then it should be:
SELECT OPLAN_IMPACTED_I d, OPLAN_IMPACTED_I r
FROM DFCY
WHERE DFCY_SEQNO = :P12_DFCY_SEQNOThis should return two values for each radio button - the displayed text and the returned value. If your radios do not have a returned value, then "Yes" will never be found. You can check this by loading the page and doing a View Source on it - search for RADIO and check what "value" attributes they have.
Andy -
Radio buttons with dropdowns?
I'm creating a form for my company's HR department, and I need some radio buttons with dependent dropdowns.
In other words, I'd like (for example) three radio buttons. No dropdowns appear until one of the buttons is selected, and then the appropriate dropdown appears. Is this possible? Or is there a better way to do this? I don't want the unselected dropdowns to be available.
I have Pro 9 for Windows and Pro X for Mac. I know virtually nothing about scripting, but I know that it can be done.
Thanks in advance for any help!
TheresaDo I add this code to the group's action, or to individual radio button actions?
To each individual radio-button.
Do I make the dropdowns visible or hidden?
Their visibility will be determined by the state of the radio-buttons. As default you can set them to be hidden, when no radio button is selected.
Do I put any code in the dropdown properties, or just in the radio button properties?
Just in the radio buttons.
And when you say "embed this code at the doc-level," what does that mean?
Go to Advanced - Document Processing - Document JavaScripts...
Create a new script, remove the default text that appears in the window and paste the code I provided instead. -
Hi,
I found this Apple script online and here's how it works:
tell application "QuickTime Player"
activate
try
if not (exists document 1) then display dialog "Please open a QuickTime movie." buttons {"Cancel"} default button 1 with icon 1
set thefile to (choose file name)
save document 1 in thefile
close document 1
end try
end tell
+I run the Apple script+
*1. It prompts me to open a movie file in Quicktime*
+I open a movie in Quicktime+
*2. It prompts me for an name and directory to save the new file in*
+I enter a name and directory+
*3. It saves a new reference movie in said directory with said name*
This is useful if I want to customize every file, but unfortunately, I just want to mass create reference movies for a whole bunch of files.
What I am looking for is for an Apple script that is a drag and drop application, so I can drop say 100 movie files or so, and have the Apple script create reference movie files with the same name and in the same directory automatically with no prompts.
Since I am unfamiliar with Apple script I was wondering if someone would be able to edit my existing script to do what I want.
Thanks so much for your help!Use Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
Good resource here:
http://bit.ly/ -
How to differentiate between Radio Buttons with the same name?
My form has two fields, to which I gave the same name ("Radio Button 1.0") in order to achieve mutual exclusivity.
Now, I would like to use JavaScript to retrieve the value of one the two fields:
var checkMark = this.getField("Radio Button1.0");
if (checkMark.value == "Yes") {
Questions:
What is the proper way to inspect the value of a Radio Button? I have tried this:
if (checkMark.value == "No") [...]
but it doesn't seem to work.
How can I tell apart 2 radio buttons with the same name?
TIA,
-RFHWhen Radio Buttons and Check Boxes are unchecked their value is "Off", so if you have "Yes", "No" buttons you will also encounter an 'Off" value. Now if you want to look at a given button, you will have to use the "isBoxChecked(nWidget)" method.
nWidget:
The 0-based index of an individual radiobutton or checkbox widget for this field. The index is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order).
Every entry in the Fields panel has a suffix giving this index, for example MyField #0.
Returns
true if the specified widget is currently checked, false otherwise.
Example
var f = this.getField("ChkBox");
if(f.isBoxChecked(0))
app.alert("The Box is Checked");
else
app.alert("The Box is not Checked"); -
Open multi page pdf specific page in Illustrator CS4 with apple script
I need to open multi page pdf specific page in Illustrator CS4 with apple script. Is it something like this:
activate (open file theTargetFolder as PDF with options …).
Thank you.Carlos,
Muchas Gracias por tu colaboración y excelente script, el que se abra el ESTK no tiene mayor importancia.
El caso es que Adobe recomienda encarecidamente NO utilizar Illustrator para editar PDFs, por diversas razones, aunque cuando no hay otro remedio o herramienta disponible, o conocida ...
Para llegar aquí, aparte de San Google, hay que ir a Adobe.es (en mi caso), pestaña de Ayuda, ..... (hasta aqui bien),
luego hay que bajar hasta el final y ver Comunidad y Foros...... (esto puede ser)
al pulsar aparacen un montón de foros se supone de programas pero en inglés,
y la última línea es de International Forums, ya casi hemos llegado)
pulsamos entonces, y por fin se abren cuatro palabras con idiomas, en una dice: español (casi no me lo puede creer)
pincho y llego por fin aquí.
Muy poca gente sabe de la existencia de este pequeño refugio, si a esta dificultad añadimos la peculiar forma de ser de la gente, .... -
Hello everyone,
JDeveloper 11.1.1.7.0
Is it possible to have radio buttons with images instead of plain text?
If not, are you interested in having this kind of feature? I am ;-)
Thx.
Filip HuysmansHi Flip,
The user when switching between modes will fire an event to the server. This even needs to be caught in a bean and set a variable's value to either true or false.
Now you can treat "TRUE" to be in view and "FALSE" to be in edit mode.
Depending on this images can be changed.
Ex: your bean will be like
class catchMode{
private boolean mode;
public void changeMode(ActionEvent ae)
boolean modVal=this.getMode();
if(modVal) //if mode is true; i.e. view mode
this.setMode(false);
else if(!modVal) //in EDIT mode
this.setMode(true);
//Generate accessors for mode
in JSPX:
<af:image source="#{catchMod.mode eq true ? 'view.png' : 'edit.png'}"
Also the partialSubmit for the command component will be set to true
Thanks,
Pandu -
I need a little help with Apple Script. I have been using a script for several months now, and all of a sudden it just stopped working. Here's the script"
============
with timeout of 9999 seconds
tell application "Finder"
activate
(* copy target file to another disk - to create a backup *)
duplicate file "Daily.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
(* copy a 2nd target file to another disk - to create a backup *)
duplicate file "Personal.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
(* now copy the 2nd target file to my iDisk *)
duplicate file "Personal.dmg" of folder "Data Backup-Daily" of disk "MacHD 1" to folder "Documents" of disk "xxxxxx" replacing yes
end tell
end timeout
============
In the above script, xxxxxx represents the name of my iDisk that is mounted in the Finder.
Here's my issue - the above script worked fine until just recently. However, now the first two steps work fine, but I get this error message while trying to copy the file to my iDisk:
"The operation could not be completed because some items had to be skipped. 'Personal.dmg'"
Does anyone have any ideas on how I can fix this? I'm wondering if Mac OS 10.4.5 might be the culprit since this problem seems to have occurred shortly after I upgraded???
Thanks,
-AstraPointHi,
Assumptions :-
uuencode command exits
mailx command exits
File name is "vas.txt".
Mail id is "[email protected]"
# START OF SCRIPT
#!/bin/ksh
vasFileName="$1"
vasRecordsDirFile=/etl/dev/work/wellness/enrl_rej/records/${vasFileName}
vasMetatdataDirFile=/etl/dev/work/wellness/enrl_rej/metadata/${vasFileName}
vasHeaderDirFile=/etl/dev/work/wellness/enrl_rej/header/${vasFileName}
vasHeaderRejDirFile=/etl/dev/work/wellness/enrl_rej/hdrrej/${vasFileName}
vasFieldsDirFile=/etl/dev/work/wellness/enrl_rej/fields/${vasFileName}
if [[ -e ${vasRecordsDirFile} ]]
then
uuencode ${vasRecordsDirFile} ${vasRecordsDirFile} | mailx -s "process complete and attached are the rejected records" [email protected]
elif [[ -e ${vasMetatdataDirFile} ]]
then
uuencode ${vasMetatdataDirFile} ${vasMetatdataDirFile} | mailx -s "Metadata Mismatch no of fields in detail didn't match" [email protected]
elif [[ -e ${vasHeaderDirFile} ]]
then
uuencode ${vasHeaderDirFile} ${vasHeaderDirFile} | mailx -s "Problem with header file - File Rejected" [email protected]
elif [[ -e ${vasHeaderRejDirFile} ]]
then
uuencode ${vasHeaderRejDirFile} ${vasHeaderRejDirFile} | mailx -s "the Percentage of rejects more than 3 percent File rejected" [email protected]
elif [[ -e ${vasFieldsDirFile} ]]
then
uuencode ${vasFieldsDirFile} ${vasFieldsDirFile} | mailx -s "The header and detail count didn't match File rejected" [email protected]
else
echo "File doesn't exist in any of the directories mentioned."
fi
# END
Vijay Bheemineni. -
Hi All
On my form i have RadioButtonList with one radio button in it. I want to do next, on button click new radio button into the RadioButtonList should appear. I tried something like this:
var oNode = xfa.form.createNode("radioButton");
questionary.#subform[0].RadioButtonList.nodes.append(oNode);
but got an error "argument mismatch".
Could you help me with this issue?Hi Mike,
Thanks for the quick info.
There is no text to edit. I have a box with a radio button at the far right side.
When I right-click on the radio button I get the following options: Cut, Copy, Paste, Delete, Rename Object..., Change Object Type>, Send Backwards, Send To Back, Palettes> and Add to Library...
When I tried the Radio Button in a document created in LC it workd as you mentioned. It is only when I import a PDF file.
I figure I probably have something configured incorrectly. I am using PDF 1.7 (Acrobat 8) when distilling.
I also noticed that some of the items in the Standard libarary are grayed out: Circle, Content Area, Image, Rectangle, Text, and Subform.
Lee -
Move a mouse with Apple script
Hello,
I need some apple script code to move a mouse to a certain location and then click. If possible could it record the location of the mouse, move it to the pre-assigned coordinates, click, and them move it back to where it was.
I am doing this so I can use multivid and Qlab to play different videos on different iOS devices. Multivid doesn't seem to let me have a cue list with different videos playing simultaneously.
I will have my iMac set up with 2 displays, one with Qlab and the other with multivid in full screen.
Thanks for the helpHere's another code using rubycocoa you might try.
_rb_click({|:position|:{30, 10}, |:click|:1, |:restore|:true, |:prep|:false})
on _rb_click(desc)
record desc : event descriptor record;
full spec = {|:position|:pos, |:click|:k, |:button|:b, |:flags|:m, |:restore|:r, |:prep|:p}
defaults = {|:position|:{}, |:click|:0, |:button|:1, |:flags|:"", |:restore|:false, |:prep|:true}
list pos : {x, y} or {}
number x, y = x, y global coordinate of position
{} denotes current location
integer k : click count (0, 1, 2 or 3}; 0 denotes only to move mouse and exit
integer b : button index (1 = left button, 2 = right button)
string m : modifier flags; e.g. 'ck' = control + command
a = capslock
s = shift
c = control
o = option
k = command
boolean r : true to restore original mouse location, false otherwise
boolean p : true to post preparatory left 1-click event to change UI context, false otherwise
return list : {x, y} = mouse location at exit
considering numeric strings
if (system info)'s system version < "10.9" then
set ruby to "/usr/bin/ruby"
else
set ruby to "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby"
end if
end considering
set defaults to {|:position|:{}, |:click|:0, |:button|:1, |:flags|:"", |:restore|:false, |:prep|:true}
set {|:position|:pos, |:click|:k, |:button|:b, |:flags|:m, |:restore|:r, |:prep|:p} to desc & defaults
if pos = {} then
set {x, y} to {"%", "%"}
else
set {x, y} to pos
end if
if k is not in {0, 1, 2, 3} then error "invalid click count: " & k number 8000
if b is not in {1, 2} then error "invalid button index: " & b number 8000
if m = "" then set m to "%"
do shell script ruby & " <<'EOF' - " & x & " " & y & " " & k & " " & b & " " & m & " " & r & " " & p & "
require 'osx/cocoa'
include OSX
if ARGV[0..1] == ['%', '%']
pt = CGEventGetLocation(CGEventCreate(nil)) # current mouse location
else
pt = CGPoint.new
pt.x, pt.y = ARGV[0..1].map {|a| a.to_f}
end
clk, btn = ARGV[2..3].map {|a| a.to_i}
flg = ARGV[4]
res, prep = ARGV[5..6].map {|a| a == 'true'}
etype, mbtn = case btn
when 1 then [KCGEventLeftMouseDown, KCGMouseButtonLeft] # [1, 0]
when 2 then [KCGEventRightMouseDown, KCGMouseButtonRight] # [3, 1]
when 3 then [KCGEventOtherMouseDown, KCGMouseButtonCenter] # [25, 2]
else raise ArgumentError, %[invalid mouse button: #{btn}]
end
mtable = {
'a' => KCGEventFlagMaskAlphaShift,
's' => KCGEventFlagMaskShift,
'c' => KCGEventFlagMaskControl,
'o' => KCGEventFlagMaskAlternate,
'k' => KCGEventFlagMaskCommand,
mf = flg.split(//).inject(0) { |mf, x| (m = mtable[x]) ? mf | m : mf }
src = CGEventSourceCreate(KCGEventSourceStateHIDSystemState)
tap = KCGHIDEventTap
pt0 = CGEventGetLocation(CGEventCreate(src)) # current mouse location
# move mouse to target location
ev0 = CGEventCreateMouseEvent(src, KCGEventMouseMoved, pt, 0) # move mouse
CGEventPost(tap, ev0)
if clk == 0
puts pt.x, pt.y
exit
end
# post preparatory left mouse click to change UI context (optional)
if prep
ev1 = CGEventCreateMouseEvent(src, KCGEventLeftMouseDown, pt, KCGMouseButtonLeft) # mouse left button down
CGEventPost(tap, ev1)
CGEventSetType(ev1, KCGEventLeftMouseUp) # mouse left button up
CGEventPost(tap, ev1)
end
# post target mouse click(s) with given flags
ev = CGEventCreateMouseEvent(src, etype, pt, mbtn) # mouse button down
CGEventSetFlags(ev, mf) # set flags
CGEventSetIntegerValueField(ev, KCGMouseEventClickState, clk) # set click count
CGEventPost(tap, ev)
CGEventSetType(ev, etype + 1) # mouse button up
CGEventPost(tap, ev)
# restore mouse location (optional)
if res
CGEventSetLocation(ev0, pt0) # restore mouse location
CGEventPost(tap, ev0)
puts pt0.x, pt0.y
exit
end
puts pt.x, pt.y
EOF"
set rr to paragraphs of result
repeat with r in rr
set r's contents to r as number
end repeat
return rr
end _rb_click -
Disable checkbox lists while clicking Radio button
Hi ,
I have a checkbox list come from LOV based on a select from database table.
I have added a Radiobutton only (not redirect not submit since I have to restrict the option as this is based on requirement).Now I want to disable the checkbox while I am clicking the radio button .
Is it any way possible .
Thanks in advance .
Cheers,
Debashis.ok, I create two radio buttons (Enable and Disable)(P8_RADIO). I created a LOV of users with checkboxes (P8_CHECK). When I click on disable all the checkboxes are disabled and enabled when I click on enable.
First add this to your radio
P8_RADIO's HTML Form Element Attributes
onclick="disable(this)"
Then, add this to the page HTML Header
<script language="JavaScript" type="text/javascript">
<!--
function disable(pThis)
var trigger = document.wwv_flow.p_v02.value ;
var rads = document.wwv_flow.p_v02 ;
if (pThis.value == 'ENABLE')
for(var i=0; i<rads.length;i++ )
{ document.wwv_flow.p_v02[i].disabled = false; }
} //end of if
else
for(var i=0; i<rads.length;i++ )
{ document.wwv_flow.p_v02[i].disabled = true; }
} //end of else
} //end of disable funtion
//-->
</script>
**note**p_v02 is the name of the checkboxes.
Hopefully this will help you and i explained it better than I did last time -
My iPod Touch battery is not working. I requested a repair through the Apple Support. On the final page, when I clicked the button that puts the info through with your credit card number, the resulting page gave an error (I wish I'd have saved it!). Anyhow, I checked my credit card and it was charged, so I assumed the repair request went through. The next day I received a form email saying my problem was with "Sync with iTunes (Not iCloud) - Data Backup/Migration (not iCloud)" instead of the battery repair. It also says for iPod customers, to send your iPod to Apple - but I had requested the "iPod Coffin" to be mailed to me so I could send it back. Obviously there was an error between the request and what was received, so I'd like to ask Customer Service about it. However, I can't find a way to contact them. When I replied to that form email, I recieved an automated reply saying emails there were not read. Anything online asks me to pay $19 and I don't have the correct issues to request an exception. The closest store is over an hour away or I'd simply go there to ask. What can I do?! Any suggestions you have are much appreciated. Thank you!
PS - The form email also says if I wait 10 days the repair request will be canceled. Does this mean my credit card will be refunded for the $85 battery replacement charge if it is canceled automatically?Thanks, but I've been on the phone with AppleCare US (where I am and live) and AppleCare UK. They continue bouncing me back and forth without helping resolve the problem.
Perhaps someones knows how to further escalate the issue at Apple? -
Selecting Different Printer With Apple Script.
Hi,
I am currently in the process of making a script to be able to print off labels without the need of much user input (read from a document or e-mail) and I want to be able to set the printer when it goes to the print screen.
this is the final apple script step in the application cmd+p brings up the 1st print menu the return takes it to the second print menu cmd+v pastes predifind by the user the ammount of copys they want
on run {input, parameters}
tell application "Labels & Addresses"
activate
tell application "System Events"
keystroke "p" using command down
delay 1
keystroke return
delay 1
keystroke "v" using command down
delay 1
tell application "System Events"
tell process "Labels & Addresses"
click (menu item whose description is "Printer")
click (menu item "Zebra Technologies ZTC GK420t" whose description is "Printer")
end tell
end tell
return input
end tell
end tell
end run
now there is chance to change the printer selection twice once in the 1st print screen and once in the 2nd print screen the only problem is im not sure how to apple script to select the right printer from the drop down menu, I got the code from a forum but I think it was old code as when I tested it it was returning errors so I modified it a bit and now it just struggles finding the menu item with description of printer.
Does anyone know what I would have to use for it to select the right printer? (The Zebra Technologies ZTC GK420t)
Help would be greatly appricited!
Thanks,
Bruce
P.S. sorry the code is a bit messy!Im NOT sure if you have just made this a little over complicated… This works just fine for me. Tested with about a dozen psd layers…
tell application "Adobe InDesign CS2"
tell active document
tell rectangle 1
tell graphic 1
tell graphic layer options
set GLC to count of graphic layers
repeat with i from 1 to GLC
if name of graphic layer i ≠ "Blue" then
set current visibility of graphic layer i to false
else
set current visibility of graphic layer i to true
end if
end repeat
end tell
end tell
end tell
end tell
end tell
This variant also works as I would have expected too… Retaining visibility from a list…
tell application "Adobe InDesign CS2"
tell active document
tell rectangle 1
tell graphic 1
tell graphic layer options
set On_List to {"Red", "Aqua", "Orange"}
set GLC to count of graphic layers
repeat with i from 1 to GLC
if name of graphic layer i is not in On_List then
set current visibility of graphic layer i to false
else
set current visibility of graphic layer i to true
end if
end repeat
end tell
end tell
end tell
end tell
end tell
Maybe you are looking for
-
Is it possible to make video play smoothly from a flash drive?
I know it's generally taboo to do just that. This is a special circumstance. I want to know if there's a way to either format the drive, or export the video (or a combination of the two) in such a way that video stored on the drive can play smoothly
-
Can WEBUTIL_C_API call dll coded in visual basic
Hi all I wonder if WEBUTIL_C_API supports calling methods in a dll coded in Visual Basic? Or it only supports C, C++ and Visual C++? Thank you
-
Final Cut Pro X quits working...
After I import a clip and try and play it the spinning ball comes up and I'm unable to do anything. Or if I try to create a project the spinning ball comes up. I haven't done anything different to my computer and I'm not doing anything different then
-
Usage of BAPI_OUTB_DELIVERY_CHANGE with extension fields populated
Hi , Does anyone have an example on how to use BAPI_OUTB_DELIVERY_CHANGE with the extension fields populated. A sample code would be very helpful . Thanks Ankit
-
Running an OCI 8.0.5 app on an 8.1.5 server
I'm trying to port an 8.1.5 OCI application to an 8.0.5 installation - but the rub is that I don't have the 8.0 server handy to build on. I grabbed the 8.0.5 libclntsh.so.1.0 and the extra files needed to link: kpudfo.o, libclient.a, libcore4.a, libn