Texting delay
I have recently been having problems the last few days with my iPhone 4. I have had it about 2 months and love it. Recently, I will send a text message and the receiver does not respond. I just figure they got busy doing something. Three days later that same receiver will text me a reply to this message. Makes me confused, since by then I have no idea what they talking about. Have held and had repeated conversions within these three days, with same receiver and others. This happens to more than 3 of my contacts. Why all of sudden is my text message not getting to my contact for days??
Hello Daimart,
Have you attempted reinserting your battery? If so, please backup your device as shown here: http://www.blackberry.com/btsc/KB33526
Then complete a reload of the device software as listed here:
Open BlackBerry Link.
Ensure the computer is connected to the Internet.
Power off the BlackBerry 10 smartphone.
Connect the device to the computer.
When the device button is available on the bottom of the BlackBerry Link window, click it.
Click the Reload button.
Test to confirm whether or not these steps resolve the issue.
Thank you.
-FB
Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.
Click "Accept as a Solution" for posts that have solved your issue(s)!
Similar Messages
-
Ios 7 bug input type=text delay
After updating from IOS6 to IOS7 a huge delay occurs on my website filling text-input fields.
Safari blocks each new input-field for 30 seconds before i can enter my data.Send feedback/suggestions to Apple.
http://www.apple.com/feedback/ipad.html
Cheers, Tom -
I've recently started having a problem where I am having a delay between someone sending me a text (not iMessage) and me recieveing it. They delay is usually between 1-2 hours. As I'm sure you can imagine this is a huge problem for me especially when recieving important messages.
I'm on the O2-UK network on pay monthly and none of my friends are having this problem (using iPhone on O2-UK)
Does anyone else have this problem or have a soloution for this? (I've tried restoring it but no luck.
Cheers guyDid you ever find a solution? I have pretty much the same issue. I will receive text messages but not receive an alert. Then anywhere from a few seconds to minutes later my phone will light up and vibrate but there is no notification. I'll unlock my phone and sure enough I have a text message.
Sometimes, I'll receive a text message when the phone is in my hand and unlocked, no vibration, no alert, but there is a badge icon and I'll see that there is a text, read it, and even reply. I'll lock my phone and a few minutes later my phone will light up and vibrate as if I have a text, but there is no notificaion, no badge icon and it will be the alert finally catching up to the text I received minutes earlier. It drives me crazy!
Anyone else? -
When i write a massage or whatsup, The text is written in delay. It started after i instaled ios 7
Hi,
Try both the following:
1.- Settings > General > Reset > Reset All Settings
2.- Settings > iCloud > turn off Documents and Data
Hope that helps -
Galaxy Note 2 - Speech to text delay
As topic suggests I don't know if i accidentally changed a setting in my speech to text but when I use it my text doesn't appear until after i hit the pause button or it cancels out. It used to show up almost instantly after i was speaking the words. Any suggestions?
I did a battery pull and I JUST did a factory reset and it still is being delayed until i hit the pause button or allow it to time out. I dont know what to do now lol.
-
I have the iPhone 5c 16 GB. I got it in November at the Black Friday sale. For the past 3 or 4 months, my text messages are delayed when I send them or they aren't sent at all. It doesn't matter what type of phone I send the text too or who their mobile service provider is. It even happens when I text my daughters who also have iPhone 5c and are on my plan. I've cleared all my messages several times and powered the phone on and off several times too.
knelsontn,
I am so sorry to hear about the delay in the text sending. Thanks for all the troubleshooting you have done already. Does this happen everywhere you are or only in a certain area? Have you tried resetting network settings? http://vz.to/1rmz1ev Let us know if this helps.
LindseyT_VZW
Follow us on Twitter @VZWSupport -
Blackberry Q10 Terrible Text Delay
I am getting really frustrated because I am experiencing a serious delay when sending texts and I am unable to do anything with my phone until the text succcesfully sends out. If I do attempt to do anything before letting it finish sending the phone lags and sometimes I lose the message I am trying to send.
Here is a video of what I'm talking about: http://youtu.be/qck8aJcCovQ
Can someone please help me find a solution for this? I do not want to erase old messages because i like being able to quickly access past conversations with a client by simply scrolling up.
I'm afraid I will be forced to just sell this phone and go to the iphone or something where others have been recommending.Hi and welcome to the forum,
I am getting the same exact problem, I am sure this will be resolved. I have had many issues with this device since the launch but to be fair slowly they are being resolved.
Let us hope this can be as well,
Regards,
David
Can you please click on the KUDOS star if this was helpful and click on Accept as Solution if your problem is solved. -
I notice on my blackberry z10 when i send a text theres a 5 - 20 second delay where the phone freezes befoere the text even sends. if i exit back into the hub and try to view a text from another person, it jumps straight back to the text i was viewing before. any ideas/ help?
Hello vdoctorabs and welcome to the BlackBerry Support Community Forums.
Sorry to hear you're having an issue with your device.
Under Settings>About>OS what's your current software version?
Does this happen with all contacts you try to text or with a specific one?
If to a specific contact, are there many texts within the chat? Lots of photos?
Thanks!
-HMthePirate
Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)! -
I am often having significant delays in receiving text messages since going from the 3GS to the 4S. It can be 10 minutes or 1 hour and once 10 hours. I'm on ATT. Is this my phone or my service? This never happened on my 3GS.
@nicolafrombrooklyn
Not sure how things work in the US.
I'm from the UK. You've probably migrated from a regular size SIM to a micro SIM, perhaps that is faulty?
Next, delays might be caused by the sheer volume of people testing out the iMessage and iCloud feature.
It could be your phone, try your SIM in another handset (use an adapter to make the SIM full size again), see if the issue is still there.
With service providers they don't guarantee any delivery of text messages within a set period of time, some don't even gaurantee delivery at all. Kinda like the post!
Hope that helps, if all else fails, Apple Store / Genius Bar. -
Whenever I receive a text message, i go to open my phone, and instead of showing me the new message in the thread, it shows me a previous part of the conversation and i have to scroll down to read the new message...
Its not life or death, but really annoying when you have a couple chats on the go with a couple people....Whenever I receive a text message, i go to open my phone, and instead of showing me the new message in the thread, it shows me a previous part of the conversation and i have to scroll down to read the new message...
Its not life or death, but really annoying when you have a couple chats on the go with a couple people.... -
Long delay when sending normal text message
Whenever I send a standard message, there is always a long delay (8 secs) before it sends. I know it is not aol because it is all the time. I am running 10.5.1 on my macbook with iChat 4. I have tried reinstalling ichat including removing all pref files. Still no luck. Any help would be great! Thanks.
Today I started from my Firewire-device with 10.4.11 and had ichat running from there. I chatted with my friend, who is on 10.5.1 - no problems at all. (so my router is not causing the problem, as I thought)
Starting from 10.5.1 again I opened up Activity Monitor and found this message every 10 secs !
25.12.07 25.12. 15:18:29 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent[654]) Exited with exit code: 1
25.12.07 25.12. 15:18:29 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent) Throttling respawn: Will start in 10 seconds
25.12.07 25.12. 15:18:39 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent[655]) posix_spawnp("/Library/Little Snitch/Little Snitch UIAgent.app/Contents/MacOS/Little Snitch UIAgent", ...): No such file or directory
I remember that I installed Little snitch some time ago and removed it manually. Then today I run the official uninstaller for it. Still I cannot get rid of this activity. May be it has to do something with the text delay in ichat? How to delete all Little Snitch processes? How can someone find these data?
Thanks for Feedback -
Long delay when sending non-btinternet mail
We are using Outlook Express/Windows mail client, and there is a long long delay when sending mail.
It just hangs saying "Connecting..." in the status bar. Receiving email has no problems.
Eventually it sometimes works or sometimes just times out.
The smtp server is not btinternet/yahoo but our own email server, which we have been using for 10 years. There is no problem pinging the smtp server. e.g. smtp.ourserver.net
It works without delays on other (non BT) home/business networks.
We have tried plugging other laptops into this home network and trying to send email (to the same mail server) - same problem.
It therefore seems to be peculiar to a BT Hub or BT as the ISP.
The problem seems to have first appeared when an upgrade was made to cater for future fibre optic services.
Any help would be greatly appreciated.Today I started from my Firewire-device with 10.4.11 and had ichat running from there. I chatted with my friend, who is on 10.5.1 - no problems at all. (so my router is not causing the problem, as I thought)
Starting from 10.5.1 again I opened up Activity Monitor and found this message every 10 secs !
25.12.07 25.12. 15:18:29 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent[654]) Exited with exit code: 1
25.12.07 25.12. 15:18:29 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent) Throttling respawn: Will start in 10 seconds
25.12.07 25.12. 15:18:39 com.apple.launchd[138] (at.obdev.LittleSnitchUIAgent[655]) posix_spawnp("/Library/Little Snitch/Little Snitch UIAgent.app/Contents/MacOS/Little Snitch UIAgent", ...): No such file or directory
I remember that I installed Little snitch some time ago and removed it manually. Then today I run the official uninstaller for it. Still I cannot get rid of this activity. May be it has to do something with the text delay in ichat? How to delete all Little Snitch processes? How can someone find these data?
Thanks for Feedback -
Sending a keypress of just Left Shift
I have an application that I need to send xx number of presses of either the Left Shift or the Left Mouse button to. No other keys or combinations, just an arbitrary number of presses of either of those, and then released before sending it again.
For example, if the application needed to have the Left Shift key pressed 10 times without having any other keys pressed.
How can I do this in AppleScript?Well Applescript itself can only send keycodes and the keycode for left & right shift ist the same (56)
tell application (path to frontmost application as text)
delay 1
activate
tell application "System Events"
key code 56
end tell
end tell
an very nice shell app for mouseclicks (can be started using do shellscript) is Cliclick. -
Hi Guys, I need help finding the right piece of Javascript code to amend in the Adora template to slow the slides down to flip every 5 or 6 seconds (5000 to 6000 milliseconds) as opposed to what I can only assume is currently 3 secs (3000 milliseconds).
I've used the default BizCatalyst file manager to "edit" line 624 of jquery.anythingslider.js from 3000 milliseconds to 6000 milliseconds with no affect.
What am I missing here? Is this not the right line? Does "editing" via BizCatalyst's File Manager not work? I'll admit it's not the most advanced File Manager around (not by a long shot) but surely it should work as it would suggest when you "edit", amend, and "save"?
I've hunted in these forums and within the other Javascript files and am having no luck.
I'm assuming the Javascript file in question is jquery.anythingslider.js. I've been through the rest of them and they don't appear to have anything to do with the slideshow. jquery.nivo.slider.pack.js might have something to do with it but... MAN... that coding is a mess. What were youu guys thinking using a Script that messy within a template that people are going to want to customise? Lift your game please - you are Adobe, not some rank amateurs. Finding a piece of code in there is like finding a needle in 100 haystacks.
Des McKenzieThanks Pat,
There is indeed a jquery.anythingslider.js file within the "JS" folder but I've tried chamging the delay from 3000 to 6000 even to 20000 but it makes no diff. Also it seems to sit for a disproportionate length of time on first load before the first scroll.
Code from jquery.anythingslider.js is:
AnythingSlider v1.5.7.3
By Chris Coyier: http://css-tricks.com
with major improvements by Doug Neiner: http://pixelgraphics.us/
based on work by Remy Sharp: http://jqueryfordesigners.com/
crazy mods by Rob Garrison (aka Mottie): https://github.com/ProLoser/AnythingSlider
To use the navigationFormatter function, you must have a function that
accepts two paramaters, and returns a string of HTML text.
index = integer index (1 based);
panel = jQuery wrapped LI item this tab references
@return = Must return a string of HTML/Text
navigationFormatter: function(index, panel){
return "Panel #" + index; // This would have each tab with the text 'Panel #X' where X = index
(function($) {
$.anythingSlider = function(el, options) {
// To avoid scope issues, use 'base' instead of 'this'
// to reference this class from internal events and functions.
var base = this;
// Wraps the ul in the necessary divs and then gives Access to jQuery element
base.$el = $(el).addClass('anythingBase').wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');
// Add a reverse reference to the DOM object
base.$el.data("AnythingSlider", base);
base.init = function(){
base.options = $.extend({}, $.anythingSlider.defaults, options);
if ($.isFunction(base.options.onBeforeInitialize)) { base.$el.bind('before_initialize', base.options.onBeforeInitialize); }
base.$el.trigger('before_initialize', base);
// Cache existing DOM elements for later
// base.$el = original ul
// for wrap - get parent() then closest in case the ul has "anythingSlider" class
base.$wrapper = base.$el.parent().closest('div.anythingSlider').addClass('anythingSlider-' + base.options.theme);
base.$window = base.$el.closest('div.anythingWindow');
base.$controls = $('<div class="anythingControls"></div>').appendTo( (base.options.appendControlsTo !== null && $(base.options.appendControlsTo).length) ? $(base.options.appendControlsTo) : base.$wrapper); // change so this works in jQuery 1.3.2
base.win = window;
base.$win = $(base.win);
base.$nav = $('<ul class="thumbNav" />').appendTo(base.$controls);
// Set up a few defaults & get details
base.timer = null; // slideshow timer (setInterval) container
base.flag = false; // event flag to prevent multiple calls (used in control click/focusin)
base.playing = false; // slideshow state
base.hovered = false; // actively hovering over the slider
base.panelSize = []; // will contain dimensions and left position of each panel
base.currentPage = base.options.startPanel;
base.adjustLimit = (base.options.infiniteSlides) ? 0 : 1; // adjust page limits for infinite or limited modes
if (base.options.playRtl) { base.$wrapper.addClass('rtl'); }
// save some options
base.original = [ base.options.autoPlay, base.options.buildNavigation, base.options.buildArrows];
base.updateSlider();
base.$currentPage = base.$items.eq(base.currentPage);
base.$lastPage = base.$currentPage;
// Get index (run time) of this slider on the page
base.runTimes = $('div.anythingSlider').index(base.$wrapper) + 1;
base.regex = new RegExp('panel' + base.runTimes + '-(\\d+)', 'i'); // hash tag regex
// Make sure easing function exists.
if (!$.isFunction($.easing[base.options.easing])) { base.options.easing = "swing"; }
// Add theme stylesheet, if it isn't already loaded
if (base.options.theme !== 'default' && !$('link[href*=' + base.options.theme + ']').length){
$('body').append('<link rel="stylesheet" href="' + base.options.themeDirectory.replace(/\{themeName\}/g, base.options.theme) + '" type="text/css" />');
// If pauseOnHover then add hover effects
if (base.options.pauseOnHover) {
base.$wrapper.hover(function() {
if (base.playing) {
base.$el.trigger('slideshow_paused', base);
base.clearTimer(true);
}, function() {
if (base.playing) {
base.$el.trigger('slideshow_unpaused', base);
base.startStop(base.playing, true);
// If a hash can not be used to trigger the plugin, then go to start panel
var startPanel = (base.options.hashTags) ? base.gotoHash() || base.options.startPanel : base.options.startPanel;
base.setCurrentPage(startPanel, false); // added to trigger events for FX code
// Hide/Show navigation & play/stop controls
base.slideControls(false);
base.$wrapper.bind('mouseenter mouseleave', function(e){
base.hovered = (e.type === "mouseenter") ? true : false;
base.slideControls( base.hovered, false );
// Add keyboard navigation
if (base.options.enableKeyboard) {
$(document).keyup(function(e){
if (base.$wrapper.is('.activeSlider')) {
switch (e.which) {
case 39: // right arrow
base.goForward();
break;
case 37: //left arrow
base.goBack();
break;
// Binds events
var triggers = "slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");
$.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function(i,o){
if ($.isFunction(base.options[o])){
base.$el.bind(triggers[i], base.options[o]);
if ($.isFunction(base.options.onSlideComplete)){
// Added setTimeout (zero time) to ensure animation is complete... see this bug report: http://bugs.jquery.com/ticket/7157
base.$el.bind('slide_complete', function(){
setTimeout(function(){ base.options.onSlideComplete(base); }, 0);
base.$el.trigger('initialized', base);
// called during initialization & to update the slider if a panel is added or deleted
base.updateSlider = function(){
// needed for updating the slider
base.$el.find('li.cloned').remove();
base.$nav.empty();
base.$items = base.$el.find('> li');
base.pages = base.$items.length;
// Set the dimensions of each panel
if (base.options.resizeContents) {
if (base.options.width) { base.$wrapper.add(base.$items).css('width', base.options.width); }
if (base.options.height) { base.$wrapper.add(base.$items).css('height', base.options.height); }
// Remove navigation & player if there is only one page
if (base.pages === 1) {
base.options.autoPlay = false;
base.options.buildNavigation = false;
base.options.buildArrows = false;
base.$controls.hide();
base.$nav.hide();
if (base.$forward) { base.$forward.add(base.$back).hide(); }
} else {
base.options.autoPlay = base.original[0];
base.options.buildNavigation = base.original[1];
base.options.buildArrows = base.original[2];
base.$controls.show();
base.$nav.show();
if (base.$forward) { base.$forward.add(base.$back).show(); }
// Build navigation tabs
base.buildNavigation();
// If autoPlay functionality is included, then initialize the settings
if (base.options.autoPlay) {
base.playing = !base.options.startStopped; // Sets the playing variable to false if startStopped is true
base.buildAutoPlay();
// Build forwards/backwards buttons
if (base.options.buildArrows) { base.buildNextBackButtons(); }
// Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
// This supports the "infinite" scrolling, also ensures any cloned elements don't duplicate an ID
base.$el.prepend( (base.options.infiniteSlides) ? base.$items.filter(':last').clone().addClass('cloned').removeAttr('id') : $('<li class="cloned" />') );
base.$el.append( (base.options.infiniteSlides) ? base.$items.filter(':first').clone().addClass('cloned').removeAttr('id') : $('<li class="cloned" />') );
base.$el.find('li.cloned').each(function(){
// replace <a> with <span> in cloned panels to prevent shifting the panels by tabbing - modified so this will work with jQuery 1.3.2
$(this).html( $(this).html().replace(/<a/gi, '<span').replace(/\/a>/gi, '/span>') );
$(this).find('[id]').removeAttr('id');
// We just added two items, time to re-cache the list, then get the dimensions of each panel
base.$items = base.$el.find('> li').addClass('panel');
base.setDimensions();
if (!base.options.resizeContents) { base.$win.load(function(){ base.setDimensions(); }); } // set dimensions after all images load
if (base.currentPage > base.pages) {
base.currentPage = base.pages;
base.setCurrentPage(base.pages, false);
base.$nav.find('a').eq(base.currentPage - 1).addClass('cur'); // update current selection
base.hasEmb = base.$items.find('embed[src*=youtube]').length; // embedded youtube objects exist in the slider
base.hasSwfo = (typeof(swfobject) !== 'undefined' && swfobject.hasOwnProperty('embedSWF') && $.isFunction(swfobject.embedSWF)) ? true : false; // is swfobject loaded?
// Initialize YouTube javascript api, if YouTube video is present
if (base.hasEmb && base.hasSwfo) {
base.$items.find('embed[src*=youtube]').each(function(i){
// Older IE doesn't have an object - just make sure we are wrapping the correct element
var $tar = ($(this).parent()[0].tagName === "OBJECT") ? $(this).parent() : $(this);
$tar.wrap('<div id="ytvideo' + i + '"></div>');
// use SWFObject if it exists, it replaces the wrapper with the object/embed
swfobject.embedSWF($(this).attr('src') + '&enablejsapi=1&version=3&playerapiid=ytvideo' + i, 'ytvideo' + i,
$tar.attr('width'), $tar.attr('height'), '10', null, null,
{ allowScriptAccess: "always", wmode : base.options.addWmodeToObject, allowfullscreen : true },
{ 'class' : $tar.attr('class'), 'style' : $tar.attr('style') },
function(){ if (i >= base.hasEmb - 1) { base.$el.trigger('swf_completed', base); } } // swf callback
// Fix tabbing through the page
base.$items.find('a').unbind('focus').bind('focus', function(e){
base.$items.find('.focusedLink').removeClass('focusedLink');
$(this).addClass('focusedLink');
var panel = $(this).closest('.panel');
if (!panel.is('.activePage')) {
base.gotoPage(base.$items.index(panel));
e.preventDefault();
// Creates the numbered navigation links
base.buildNavigation = function() {
if (base.options.buildNavigation && (base.pages > 1)) {
base.$items.filter(':not(.cloned)').each(function(i,el) {
var index = i + 1,
klass = ((index === 1) ? 'first' : '') + ((index === base.pages) ? 'last' : ''),
$a = $('<a href="#"></a>').addClass('panel' + index).wrap('<li class=" + klass + " />');
base.$nav.append($a.parent()); // use $a.parent() so IE will add <li> instead of only the <a> to the <ul>
// If a formatter function is present, use it
if ($.isFunction(base.options.navigationFormatter)) {
var tmp = base.options.navigationFormatter(index, $(this));
$a.html(tmp);
// Add formatting to title attribute if text is hidden
if (parseInt($a.css('text-indent'),10) < 0) { $a.addClass(base.options.tooltipClass).attr('title', tmp); }
} else {
$a.text(index);
$a.bind(base.options.clickControls, function(e) {
if (!base.flag && base.options.enableNavigation) {
// prevent running functions twice (once for click, second time for focusin)
base.flag = true; setTimeout(function(){ base.flag = false; }, 100);
base.gotoPage(index);
if (base.options.hashTags) { base.setHash(index); }
e.preventDefault();
// Creates the Forward/Backward buttons
base.buildNextBackButtons = function() {
if (base.$forward) { return; }
base.$forward = $('<span class="arrow forward"><a href="#">' + base.options.forwardText + '</a></span>');
base.$back = $('<span class="arrow back"><a href="#">' + base.options.backText + '</a></span>');
// Bind to the forward and back buttons
base.$back.bind(base.options.clickArrows, function(e) {
base.goBack();
e.preventDefault();
base.$forward.bind(base.options.clickArrows, function(e) {
base.goForward();
e.preventDefault();
// using tab to get to arrow links will show they have focus (outline is disabled in css)
base.$back.add(base.$forward).find('a').bind('focusin focusout',function(){
$(this).toggleClass('hover');
// Append elements to page
base.$wrapper.prepend(base.$forward).prepend(base.$back);
base.$arrowWidth = base.$forward.width();
// Creates the Start/Stop button
base.buildAutoPlay = function(){
if (base.$startStop) { return; }
base.$startStop = $("<a href='#' class='start-stop'></a>").html(base.playing ? base.options.stopText : base.options.startText);
base.$controls.prepend(base.$startStop);
base.$startStop
.bind(base.options.clickSlideshow, function(e) {
if (base.options.enablePlay) {
base.startStop(!base.playing);
if (base.playing) {
if (base.options.playRtl) {
base.goBack(true);
} else {
base.goForward(true);
e.preventDefault();
// show button has focus while tabbing
.bind('focusin focusout',function(){
$(this).toggleClass('hover');
// Use the same setting, but trigger the start;
base.startStop(base.playing);
// Set panel dimensions to either resize content or adjust panel to content
base.setDimensions = function(){
var w, h, c, cw, dw, leftEdge = 0, bww = base.$window.width(), winw = base.$win.width();
base.$items.each(function(i){
c = $(this).children('*');
if (base.options.resizeContents){
// get viewport width & height from options (if set), or css
w = parseInt(base.options.width,10) || bww;
h = parseInt(base.options.height,10) || base.$window.height();
// resize panel
$(this).css({ width: w, height: h });
// resize panel contents, if solitary (wrapped content or solitary image)
if (c.length === 1){
c.css({ width: '100%', height: '100%' });
if (c[0].tagName === "OBJECT") { c.find('embed').andSelf().attr({ width: '100%', height: '100%' }); }
} else {
// get panel width & height and save it
w = $(this).width(); // if not defined, it will return the width of the ul parent
dw = (w >= winw) ? true : false; // width defined from css?
if (c.length === 1 && dw){
cw = (c.width() >= winw) ? bww : c.width(); // get width of solitary child
$(this).css('width', cw); // set width of panel
c.css('max-width', cw); // set max width for all children
w = cw;
w = (dw) ? base.options.width || bww : w;
$(this).css('width', w);
h = $(this).outerHeight(); // get height after setting width
$(this).css('height', h);
base.panelSize[i] = [w,h,leftEdge];
leftEdge += w;
// Set total width of slider, but don't go beyond the set max overall width (limited by Opera)
base.$el.css('width', (leftEdge < base.options.maxOverallWidth) ? leftEdge : base.options.maxOverallWidth);
base.gotoPage = function(page, autoplay, callback) {
if (base.pages === 1) { return; }
base.$lastPage = base.$items.eq(base.currentPage);
if (typeof(page) !== "number") {
page = base.options.startPage;
base.setCurrentPage(base.options.startPage);
// pause YouTube videos before scrolling or prevent change if playing
if (base.hasEmb && base.checkVideo(base.playing)) { return; }
if (page > base.pages + 1 - base.adjustLimit) { page = (!base.options.infiniteSlides && !base.options.stopAtEnd) ? 1 : base.pages; }
if (page < base.adjustLimit ) { page = (!base.options.infiniteSlides && !base.options.stopAtEnd) ? base.pages : 1; }
base.$currentPage = base.$items.eq(page);
base.currentPage = page; // ensure that event has correct target page
base.$el.trigger('slide_init', base);
base.slideControls(true, false);
// When autoplay isn't passed, we stop the timer
if (autoplay !== true) { autoplay = false; }
// Stop the slider when we reach the last page, if the option stopAtEnd is set to true
if (!autoplay || (base.options.stopAtEnd && page === base.pages)) { base.startStop(false); }
base.$el.trigger('slide_begin', base);
// resize slider if content size varies
if (!base.options.resizeContents) {
// animating the wrapper resize before the window prevents flickering in Firefox
base.$wrapper.filter(':not(:animated)').animate(
{ width: base.panelSize[page][0], height: base.panelSize[page][1] },
{ queue: false, duration: base.options.animationTime, easing: base.options.easing }
// Animate Slider
base.$window.filter(':not(:animated)').animate(
{ scrollLeft : base.panelSize[page][2] },
{ queue: false, duration: base.options.animationTime, easing: base.options.easing, complete: function(){ base.endAnimation(page, callback); } }
base.endAnimation = function(page, callback){
if (page === 0) {
base.$window.scrollLeft(base.panelSize[base.pages][2]);
page = base.pages;
} else if (page > base.pages) {
// reset back to start position
base.$window.scrollLeft(base.panelSize[1][2]);
page = 1;
base.setCurrentPage(page, false);
// Add active panel class
base.$items.removeClass('activePage').eq(page).addClass('activePage');
if (!base.hovered) { base.slideControls(false); }
// continue YouTube video if in current panel
if (base.hasEmb){
var emb = base.$currentPage.find('object[id*=ytvideo], embed[id*=ytvideo]');
// player states: unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
if (emb.length && $.isFunction(emb[0].getPlayerState) && emb[0].getPlayerState() > 0 && emb[0].getPlayerState() !== 5) {
emb[0].playVideo();
base.$el.trigger('slide_complete', base);
// callback from external slide control: $('#slider').anythingSlider(4, function(slider){ })
if (typeof callback === 'function') { callback(base); }
// Continue slideshow after a delay
if (base.options.autoPlayLocked && !base.playing) {
setTimeout(function(){
base.startStop(true);
// subtract out slide delay as the slideshow waits that additional time.
}, base.options.resumeDelay - base.options.delay);
base.setCurrentPage = function(page, move) {
if (page > base.pages + 1 - base.adjustLimit) { page = base.pages - base.adjustLimit; }
if (page < base.adjustLimit ) { page = 1; }
// Set visual
if (base.options.buildNavigation){
base.$nav.find('.cur').removeClass('cur');
base.$nav.find('a').eq(page - 1).addClass('cur');
// hide/show arrows based on infinite scroll mode
if (!base.options.infiniteSlides && base.options.stopAtEnd){
base.$wrapper.find('span.forward')[ page === base.pages ? 'addClass' : 'removeClass']('disabled');
base.$wrapper.find('span.back')[ page === 1 ? 'addClass' : 'removeClass']('disabled');
if (page === base.pages && base.playing) { base.startStop(); }
// Only change left if move does not equal false
if (!move) {
base.$wrapper.css({
width: base.panelSize[page][0],
height: base.panelSize[page][1]
base.$wrapper.scrollLeft(0); // reset in case tabbing changed this scrollLeft
base.$window.scrollLeft( base.panelSize[page][2] );
// Update local variable
base.currentPage = page;
// Set current slider as active so keyboard navigation works properly
if (!base.$wrapper.is('.activeSlider')){
$('.activeSlider').removeClass('activeSlider');
base.$wrapper.addClass('activeSlider');
base.goForward = function(autoplay) {
if (autoplay !== true) { autoplay = false; base.startStop(false); }
base.gotoPage(base.currentPage + 1, autoplay);
base.goBack = function(autoplay) {
if (autoplay !== true) { autoplay = false; base.startStop(false); }
base.gotoPage(base.currentPage - 1, autoplay);
// This method tries to find a hash that matches panel-X
// If found, it tries to find a matching item
// If that is found as well, then that item starts visible
base.gotoHash = function(){
var n = base.win.location.hash.match(base.regex);
return (n===null) ? '' : parseInt(n[1],10);
base.setHash = function(n){
var s = 'panel' + base.runTimes + '-',
h = base.win.location.hash;
if ( typeof h !== 'undefined' ) {
base.win.location.hash = (h.indexOf(s) > 0) ? h.replace(base.regex, s + n) : h + "&" + s + n;
// Slide controls (nav and play/stop button up or down)
base.slideControls = function(toggle, playing){
var dir = (toggle) ? 'slideDown' : 'slideUp',
t1 = (toggle) ? 0 : base.options.animationTime,
t2 = (toggle) ? base.options.animationTime: 0,
sign = (toggle) ? 0 : 1; // 0 = visible, 1 = hidden
if (base.options.toggleControls) {
base.$controls.stop(true,true).delay(t1)[dir](base.options.animationTime/2).delay(t2);
if (base.options.buildArrows && base.options.toggleArrows) {
if (!base.hovered && base.playing) { sign = 1; t2 = 0; } // don't animate arrows during slideshow
base.$forward.stop(true,true).delay(t1).animate({ right: sign * base.$arrowWidth, opacity: t2 }, base.options.animationTime/2);
base.$back.stop(true,true).delay(t1).animate({ left: sign * base.$arrowWidth, opacity: t2 }, base.options.animationTime/2);
base.clearTimer = function(paused){
// Clear the timer only if it is set
if (base.timer) {
base.win.clearInterval(base.timer);
if (!paused) {
base.$el.trigger('slideshow_stop', base);
// Handles stopping and playing the slideshow
// Pass startStop(false) to stop and startStop(true) to play
base.startStop = function(playing, paused) {
if (playing !== true) { playing = false; } // Default if not supplied is false
if (playing && !paused) {
base.$el.trigger('slideshow_start', base);
// Update variable
base.playing = playing;
// Toggle playing and text
if (base.options.autoPlay) {
base.$startStop.toggleClass('playing', playing).html( playing ? base.options.stopText : base.options.startText );
// add button text to title attribute if it is hidden by text-indent
if (parseInt(base.$startStop.css('text-indent'),10) < 0) {
base.$startStop.addClass(base.options.tooltipClass).attr('title', playing ? 'Stop' : 'Start');
if (playing){
base.clearTimer(true); // Just in case this was triggered twice in a row
base.timer = base.win.setInterval(function() {
// prevent autoplay if video is playing
if (!(base.hasEmb && base.checkVideo(playing))) {
if (base.options.playRtl) {
base.goBack(true);
} else {
base.goForward(true);
}, base.options.delay);
} else {
base.clearTimer();
base.checkVideo = function(playing){
// pause YouTube videos before scrolling?
var emb, ps, stopAdvance = false;
base.$items.find('object[id*=ytvideo], embed[id*=ytvideo]').each(function(){ // include embed for IE; if not using SWFObject, old detach/append code needs "object embed" here
emb = $(this);
if (emb.length && $.isFunction(emb[0].getPlayerState)) {
// player states: unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
ps = emb[0].getPlayerState();
// if autoplay, video playing, video is in current panel and resume option are true, then don't advance
if (playing && (ps === 1 || ps > 2) && base.$items.index(emb.closest('li.panel')) === base.currentPage && base.options.resumeOnVideoEnd) {
stopAdvance = true;
} else {
// pause video if not autoplaying (if already initialized)
if (ps > 0) { emb[0].pauseVideo(); }
return stopAdvance;
// Trigger the initialization
base.init();
$.anythingSlider.defaults = {
// Appearance
width : null, // Override the default CSS width
height : null, // Override the default CSS height
resizeContents : true, // If true, solitary images/objects in the panel will expand to fit the viewport
tooltipClass : 'tooltip', // Class added to navigation & start/stop button (text copied to title if it is hidden by a negative text indent)
theme : 'default', // Theme name
themeDirectory : 'css/theme-{themeName}.css', // Theme directory & filename {themeName} is replaced by the theme value above
// Navigation
startPanel : 1, // This sets the initial panel
hashTags : true, // Should links change the hashtag in the URL?
infiniteSlides : true, // if false, the slider will not wrap
enableKeyboard : true, // if false, keyboard arrow keys will not work for the current panel.
buildArrows : true, // If true, builds the forwards and backwards buttons
toggleArrows : false, // If true, side navigation arrows will slide out on hovering & hide @ other times
buildNavigation : true, // If true, builds a list of anchor links to link to each panel
enableNavigation : true, // if false, navigation links will still be visible, but not clickable.
toggleControls : false, // if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times
appendControlsTo : null, // A HTML element (jQuery Object, selector or HTMLNode) to which the controls will be appended if not null
navigationFormatter : null, // Details at the top of the file on this use (advanced use)
forwardText : "»", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
backText : "«", // Link text used to move the slider back (hidden by CSS, replace with arrow image)
// Slideshow options
enablePlay : true, // if false, the play/stop button will still be visible, but not clickable.
autoPlay : true, // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
autoPlayLocked : false, // If true, user changing slides will not stop the slideshow
startStopped : false, // If autoPlay is on, this can force it to start stopped
pauseOnHover : true, // If true & the slideshow is active, the slideshow will pause on hover
resumeOnVideoEnd : true, // If true & the slideshow is active & a youtube video is playing, it will pause the autoplay until the video is complete
stopAtEnd : false, // If true & the slideshow is active, the slideshow will stop on the last page. This also stops the rewind effect when infiniteSlides is false.
playRtl : false, // If true, the slideshow will move right-to-left
startText : "Start", // Start button text
stopText : "Stop", // Stop button text
delay : 6000, // How long between slideshow transitions in AutoPlay mode (in milliseconds)
resumeDelay : 15000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
animationTime : 600, // How long the slideshow transition takes (in milliseconds)
easing : "swing", // Anything other than "linear" or "swing" requires the easing plugin
// Callbacks - removed from options to reduce size - they still work
// Interactivity
clickArrows : "click", // Event used to activate arrow functionality (e.g. "click" or "mouseenter")
clickControls : "click focusin", // Events used to activate navigation control functionality
clickSlideshow : "click", // Event used to activate slideshow play/stop button
// Misc options
addWmodeToObject : "opaque", // If your slider has an embedded object, the script will automatically add a wmode parameter with this setting
maxOverallWidth : 32766 // Max width (in pixels) of combined sliders (side-to-side); set to 32766 to prevent problems with Opera
$.fn.anythingSlider = function(options, callback) {
return this.each(function(i){
var anySlide = $(this).data('AnythingSlider');
// initialize the slider but prevent multiple initializations
if ((typeof(options)).match('object|undefined')){
if (!anySlide) {
(new $.anythingSlider(this, options));
} else {
anySlide.updateSlider();
// If options is a number, process as an external link to page #: $(element).anythingSlider(#)
} else if (/\d/.test(options) && !isNaN(options) && anySlide) {
var page = (typeof(options) === "number") ? options : parseInt($.trim(options),10); // accepts " 2 "
// ignore out of bound pages
if ( page >= 1 && page <= anySlide.pages ) {
anySlide.gotoPage(page, false, callback); // page #, autoplay, one time callback
})(jQuery);
/* AnythingSlider works with works with jQuery 1.4+, but you can uncomment the code below to make it
work with jQuery 1.3.2. You'll have to manually add the code below to the minified copy if needed */
// Copied from jQuery 1.4.4 to make AnythingSlider backwards compatible to jQuery 1.3.2
if (typeof jQuery.fn.delay === 'undefined') {
jQuery.fn.extend({
delay: function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx";
return this.queue( type, function() { var elem = this; setTimeout(function() { jQuery.dequeue( elem, type ); }, time ); }); -
Script: Does sheet exist? If not, duplicate generic client & rename
In my continuing education of Applescript, I've run across the following gap in my knowledge.
I'm in a "tell Numbers" block. I've opened up my Numbers file (Clients.numbers). There will be about 60 sheets there, almost all of which (exceptions are a Master sheet with summaries and a Generic client sheet) relate to specific clients. These sheets are named with the client's name: i.e. "JetsonGeorge", "FlintstoneFred", etc. Each sheet has several tables: personal data, visit dates, billing data, etc.
The script has a list of client names (clients I've seen today, via iCal). I want the script to see if there is a sheet for each client. For those clients who don't have a sheet yet, duplicate the sheet called Generic and rename the duplicate to the client name.
I know how to do this for files in Finder. But I've been unable to find anything in the Numbers dictionary (or here searching on "script duplicate sheet") to make this happen within a Numbers file.
I appreciate any information you can offer.
VinceHere is a variant of the posted script.
This one use a modified version of the duplicateSheet handler.
It assumes that it may create new sheets without modifying the default contents.
Working this way fasten seriously the job because what is time consuming is not the duplicate task by itself but
the selection of the sheet to replicate.
This new version selects the master sheet when it duplicate it for the first time in a loop.
For the other replicate tasks, it will not re-select the master but it will replicate the last replicate .
As such a replicate is identical to the master one, the result will be the same but it will be very faster.
--[SCRIPT duplicatesheet3]
Enregistrer le script en tant que Script : duplicate_sheet.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Ouvrir le document Perfect_Kradebook
aller au menu Scripts , choisir Numbers puis choisir "duplicate_sheet"
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
--=====
Save the script as a Script: duplicate_sheet.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Open the Perfect_Kradebook document
go to the Scripts Menu, choose Numbers, then choose "duplicate_sheet"
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/05/08
2010/06/28
--=====
Some global constants
property the_students : {"George", "John", "Paul", "Ringo"}
property master_Sheet : "master"
property tMasterTable1 : "tableau 1"
property tMasterTable2 : "tableau 2"
property tMasterTable3 : "tableau 3"
property sKradebook : "Kradebook"
property tKradebook : "Kradebook"
property tCaution : "CAUTION"
property sReport : "Report"
property tReport1 : "report 1"
property tReport2 : "report 2"
property tReport3 : "report 3"
property columnOfIDs : 2 (* vas 6 to grab the students ID *)
--=====
property mesFeuilles : {}
Three properties required by the handler duplicateSheet
property listeObjets : {}
property lesFeuilles : {}
property targetSheetRow : missing value
rule the behaviour of the handler duplicateSheet
--=====
on run
my activateGUIscripting()
my nettoie()
tell application "Numbers"
set dName to name of document 1
tell document dName to set my mesFeuilles to name of sheets
end tell -- Numbers
set missing to {}
if master_Sheet is not in my mesFeuilles then copy master_Sheet to end of missing
if sKradebook is not in my mesFeuilles then copy sKradebook to end of missing
if sReport is not in my mesFeuilles then copy sReport to end of missing
if missing is not {} then
if (count of missing) > 1 then
if my parleAnglais() then
error "The sheets “" & my recolle(missing, " and ") & "” are unavailable in the document “" & dName & "” !"
else
error "Les feuilles “" & my recolle(missing, " et ") & "” n’existent pas dans le document “" & dName & "” !"
end if
else
if my parleAnglais() then
error "The sheet “" & item 1 of missing & "” is unavailable in the document “" & dName & "” !"
else
error "La feuille “" & item 1 of missing & "” n’existe pas dans le document “" & dName & "” !"
end if
end if -- count…
end if -- missing…
tell application "Numbers" to tell document dName
set tables1 to name of tables of sheet master_Sheet
set tables2 to name of tables of sheet sKradebook
--set tables3 to name of tables of sheet sReport
end tell
set missing to {}
if tMasterTable1 is not in tables1 then copy tMasterTable1 to end of missing
if tMasterTable2 is not in tables1 then copy tMasterTable2 to end of missing
if tMasterTable3 is not in tables1 then copy tMasterTable3 to end of missing
if tKradebook is not in tables2 then copy tKradebook to end of missing
if tCaution is not in tables2 then copy tCaution to end of missing
--if tReport1 is not in tables3 then copy tReport1 to end of missing
--if tReport2 is not in tables3 then copy tReport2 to end of missing
--if tReport3 is not in tables3 then copy tReport3 to end of missing
if missing is not {} then
if (count of missing) > 1 then
if my parleAnglais() then
error "The tables “" & my recolle(missing, " and ") & "” are unavailable in the document “" & dName & "” !"
else
error "Les tables “" & my recolle(missing, " et ") & "” n’existent pas dans le document “" & dName & "” !"
end if
else
if my parleAnglais() then
error "The table “" & item 1 of missing & "” is unavailable in the document “" & dName & "” !"
else
error "La table “" & item 1 of missing & "” n’existe pas dans le document “" & dName & "” !"
end if
end if -- count…
end if -- missing…
tell application "Numbers" to tell document dName
Grabs the list of students IDs
With the property setting, here we don't use the IDs but the Last Names
tell sheet sKradebook
tell table tKradebook to set IDs to items 6 thru -2 of (get value of cells of column columnOfIDs)
end tell
set report to ""
set nbIDS to count of IDs
set replicates to {}
repeat with anID in IDs
set anID to anID as text
set match to 0
repeat with j from 1 to nbIDS
if (item j of IDs) as text is anID then set match to match + 1
end repeat
if match > 1 then copy anID to end of replicates
end repeat
if replicates is not {} then
set report to report & my recolle(replicates, ", ")
if my parleAnglais() then
set report to report & " are replicates in " & tKradebook
else
set report to report & " doublonnent dans " & tKradebook
end if -- parleAnglais
end if -- replicates…
if report is not "" then error report
end tell -- Numbers
* Here we are ready to enter the main loop
set targetSheetRow to missing value
repeat with studentID in IDs
if studentID as text is not in my mesFeuilles then (*
Duplicate the master sheet *)
my duplicateSheet_v3(dName, master_Sheet, studentID as text)
delay 0.1
end if
end repeat -- for next student
my nettoie()
end run
--=====
on nettoie()
set my mesFeuilles to {}
set my listeObjets to {}
set my lesFeuilles to {}
set targetSheetRow to missing value
end nettoie
--=====
on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe
--=====
on recolle(l, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to oTIDs
return t
end recolle
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on activateGUIscripting()
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true (* to be sure than GUI scripting will be active *)
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard shortcuts if the third parameter describe the required modifier keys.
on raccourci(a, t, d)
local k
tell application a to activate
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
CAUTION, this handler requires three properties :
property listeObjets : {}
property lesFeuilles : {}
property targetSheetRow : missing value
on duplicateSheet_v3(theDoc, theSheet, newName)
most of this handler is from Nigel Garvey
local maybe
try
tell application "Numbers"
activate
set theDoc to name of document theDoc (* useful if the passed value is a number. Checks also that we passed the name of an open doc *)
end tell -- Numbers
on error
if my parleAnglais() then
error "The spreadsheet “" & theDoc & "” is not open !"
else
error "Le tableur « " & theDoc & " » n’est pas ouvert ! "
end if -- my parleAnglais
end try
if targetSheetRow is missing value then
This piece of code is time consuming so, when there is nothing to change in the new sheet,
we may drop it when it was already called with the same settings.
The code will no longer duplicate the master sheet one but the newly created one.
As this one is a clone of the master, the result will be the same but it will be really faster.
try
tell application "Numbers" to tell document theDoc
set theSheet to name of sheet theSheet (* useful if the passed value is a number. If we passed a string, checks that the sheet theSheet is available *)
end tell -- Numbers
on error
if my parleAnglais() then
error "The sheet “" & theSheet & "” is unavailable in the spreadsheet “" & theDoc & "” !"
else
error "La feuille « " & theSheet & " » n’existe pas dans le tableur « " & theDoc & " » ! "
end if -- my parleAnglais
end try
set maybe to 5 > (system attribute "sys2")
tell application "System Events" to tell application process "Numbers"
tell outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window theDoc
if maybe then (* macOS X 10.4.x
'(value of attributes contains 0)': '(value of attribute "AXDisclosureLevel" is 0)' sometimes works in Tiger, sometimes not.
The only possible instances of 0 amongst the attributes are the disclosure level of a sheet row and the index of the first row, which represents a sheet anyway.
Another possibility is '(value of attribute -1 is 0)', which makes me uneasy. *)
set targetSheetRow to first row where ((value of attributes contains 0) and (value of first static text is theSheet))
else (* macOS X 10.5.x or higher *)
set targetSheetRow to first row where ((value of attribute "AXDisclosureLevel" is 0) and ((groups is {}) and (value of first static text is theSheet)) or (value of first group's first static text is theSheet))
end if -- maybe…
tell targetSheetRow to set {value of attribute "AXSelected", value of attribute "AXDisclosing"} to {true, true}
-- Focus the "Sheets" column ('outline 1 …') AFTER the target row is selected.
set value of attribute "AXFocused" to true
delay 0.1
set maybe to (get value of attribute "AXPosition" of targetSheetRow)
Sometimes, the sheet's thumbnail is selected (with the yellow border) and the duplicate instruction behave correctly
but sometimes the yellow border doesn't surface and the duplicate code fails (issue a bell)
end tell -- outline…
end tell -- System Events
end if -- targetSheetRow…
tell application "Numbers" to tell document theDoc
set my listeObjets to name of sheets
end tell -- Numbers
my raccourci("Numbers", "d", "c") (* duplicate , must be here for Snow Leopard !!!! *)
tell application "Numbers" to tell document theDoc
repeat
set my lesFeuilles to name of sheets
if my lesFeuilles is not my listeObjets then exit repeat
delay 0.1
end repeat
repeat with i in my lesFeuilles
if i is not in my listeObjets then (*
Here i is the name of the newly created sheet *)
set name of sheet i to newName
exit repeat
end if -- i is not…
end repeat
end tell -- document thedoc…
end duplicateSheet_v3
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) mercredi 30 juin 2010 12:48:47
Maybe you are looking for
-
When I click onto the firefox webbrowser, I get the message "firefox has stopped working, windows will close the application to find a solution to the problem."
-
Basis Activities in ABAP Trial version
Hello all, I wanted to know if we can practice basis activities in ABAP Trial version. Also i want to know if we can install j2ee engine and make it as addin system. <REMOVED BY MODERATOR> Rgds, Dinesh Edited by: Alvaro Tejada Galindo on
-
Why does my computer keep disconnecting from my wifi?
Why does my computer keep disconnecting from my wifi?
-
Are INDD files interchangeable between a Mac and a PC?
-
Is it okay to preinstall firefox on non-gms device we developed?
Hi, I work for a manufacturer in Taiwan. We're developing an industrial grade Android device and it shall be launched by Jan, 2015. I know Firefox browser is free to download and install via Play Store, but our device is not going to pass GMS, so I'm