|
Slow code
G’day scripters
Is there any method of speeding up this handler, please? ATM it’s taking 17 seconds.
Regards
Santa
on checkthecode1()
set (my EnteringCode) to true
say "Please wait" without
G’day scripters
Is there any method of speeding up this handler, please? ATM it’s taking 17 seconds.
Regards
Santa
on checkthecode1()
set (my EnteringCode) to true
say "Please wait" without
|
By
Brian Christmas
·
#42
·
|
|
Re: Slow code
G’day Takaaki
I’m trying to generate 10,000 serial numbers, as text, in groups of 8,8,6,6 numbers, with dash separators.
I’ve actually got a script that makes the seed number difficult to
G’day Takaaki
I’m trying to generate 10,000 serial numbers, as text, in groups of 8,8,6,6 numbers, with dash separators.
I’ve actually got a script that makes the seed number difficult to
|
By
Brian Christmas
·
#43
·
|
|
Re: Slow code
G’day all
This effort, after pouring over Shanes Ebook, and lots of googling, only stripped 2.4 seconds off the proccessing time, down to 14.3 seconds
Can anyone suggest further or better
G’day all
This effort, after pouring over Shanes Ebook, and lots of googling, only stripped 2.4 seconds off the proccessing time, down to 14.3 seconds
Can anyone suggest further or better
|
By
Brian Christmas
·
#44
·
|
|
Re: Slow code
Of interest, it appears the random number generation is the bottleneck.
I stripped and simplified the code to the first example below, and it averages 11.5 seconds, a drop of about 5 seconds. Using
Of interest, it appears the random number generation is the bottleneck.
I stripped and simplified the code to the first example below, and it averages 11.5 seconds, a drop of about 5 seconds. Using
|
By
Brian Christmas
·
#45
·
|
|
Re: Slow code
- Try using a list of strings instead of the string "l". It gets resized 10000 times.
- If it's time critical, try using a different language. AppleScript was not designed for this. A quick Python
- Try using a list of strings instead of the string "l". It gets resized 10000 times.
- If it's time critical, try using a different language. AppleScript was not designed for this. A quick Python
|
By
Karsten Wolf
·
#46
·
|
|
Re: Slow code
Replacing all "as text" with "as string" shaves another 0.5s
-karsten
Replacing all "as text" with "as string" shaves another 0.5s
-karsten
|
By
Karsten Wolf
·
#47
·
|
|
Re: Slow code
G’day Karsten
Thank you very, very much.
I’ve made some further alterations, and in Script Debugger it takes a consistant 3.55 seconds now.
However, in my App, it now takes less than 2 seconds,
G’day Karsten
Thank you very, very much.
I’ve made some further alterations, and in Script Debugger it takes a consistant 3.55 seconds now.
However, in my App, it now takes less than 2 seconds,
|
By
Brian Christmas
·
#48
·
|
|
Re: Slow code
Brian,
not to compete in time, but if you want to generate random serial “numbers” then a much simpler approach would be to use
————
set lista to {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "A", "B",
Brian,
not to compete in time, but if you want to generate random serial “numbers” then a much simpler approach would be to use
————
set lista to {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "A", "B",
|
By
Deivy Petrescu
·
#49
·
|
|
Re: Slow code
G’day Nigel
Thank you.
Luckily the seed I REALLY used is 8 digits. I deliberately altered my code for posting.
Very, very useful knowledge, but I HAD extensively tested the overall code to ensure
G’day Nigel
Thank you.
Luckily the seed I REALLY used is 8 digits. I deliberately altered my code for posting.
Very, very useful knowledge, but I HAD extensively tested the overall code to ensure
|
By
Brian Christmas
·
#50
·
|
|
Tearing my bloody hair out.
G’day scripters
I’m trying to work out the correct syntax to get a subscription list from FastSpring, who I’m trying to set up to manage my subscritions for my APP.
I’ve contacted FastSprings
G’day scripters
I’m trying to work out the correct syntax to get a subscription list from FastSpring, who I’m trying to set up to manage my subscritions for my APP.
I’ve contacted FastSprings
|
By
Brian Christmas
·
#51
·
|
|
Re: Tearing my bloody hair out.
G’day again scripters
I’ve been trying to study Curl for days, and now how to use Curl in a ‘do shell script’.
I can’t for the life of me see why this won’t work? BUT, I’m really a
G’day again scripters
I’ve been trying to study Curl for days, and now how to use Curl in a ‘do shell script’.
I can’t for the life of me see why this won’t work? BUT, I’m really a
|
By
Brian Christmas
·
#52
·
|
|
Re: Tearing my bloody hair out.
Hi Brian,
when I type "man curl“ in the terminal on my Mac then it reports:
-G, --get
When used, this option will make all data specified with -d, --data, --data-binary or
Hi Brian,
when I type "man curl“ in the terminal on my Mac then it reports:
-G, --get
When used, this option will make all data specified with -d, --data, --data-binary or
|
By
EAS EDV-Analyse Sandro Sabatini
·
#53
·
|
|
Re: Tearing my bloody hair out.
G’day All
A very big thank you to everyone who replied.
Turned out that Jim Skibbie was spot on, (once I put the correct passcode in), possibly only because I tried his suggestion first, the other
G’day All
A very big thank you to everyone who replied.
Turned out that Jim Skibbie was spot on, (once I put the correct passcode in), possibly only because I tried his suggestion first, the other
|
By
Brian Christmas
·
#54
·
|
|
Re: Tearing my bloody hair out.
Further to this matter
I had realized that the fact that the keys were in Quotes in jsonURL meant that it wasn’t really a Dictionary, but thought there might be some simple way to change it, so
Further to this matter
I had realized that the fact that the keys were in Quotes in jsonURL meant that it wasn’t really a Dictionary, but thought there might be some simple way to change it, so
|
By
Brian Christmas
·
#55
·
|
|
Re: Tearing my bloody hair out.
Sorry about all this noise!
I’ve just realized something, but I don’t know the answer to my understanding.
When I posted the below Script 2, I’d added 'as list’ to the end of…..
set temp to
Sorry about all this noise!
I’ve just realized something, but I don’t know the answer to my understanding.
When I posted the below Script 2, I’d added 'as list’ to the end of…..
set temp to
|
By
Brian Christmas
·
#56
·
|
|
Re: Tearing my bloody hair out.
Did you check MacScripter.net? Here's a thread that was active only this week: <http://macscripter.net/viewtopic.php?id=42971>. The topic: "Parsing JSON files". Read *it all*. The answer is in there,
Did you check MacScripter.net? Here's a thread that was active only this week: <http://macscripter.net/viewtopic.php?id=42971>. The topic: "Parsing JSON files". Read *it all*. The answer is in there,
|
By
Shane Stanley
·
#57
·
|
|
Important question, please?
G’day Scripters.
Apart from several weeks of thorough testing, it appears my 10-years-in-the-making App is ready for Public release. I might actually be able to stop annoying you all!!!
Thank you to
G’day Scripters.
Apart from several weeks of thorough testing, it appears my 10-years-in-the-making App is ready for Public release. I might actually be able to stop annoying you all!!!
Thank you to
|
By
Brian Christmas
·
#58
·
|
|
Re: Important question, please?
I don’t believe there’s an AppleScript-Swift bridge, so you’ll have to translate your ASObjC and vanilla AppleScript code directly into Swift. That will not be straightforward.
I’ve spent the
I don’t believe there’s an AppleScript-Swift bridge, so you’ll have to translate your ASObjC and vanilla AppleScript code directly into Swift. That will not be straightforward.
I’ve spent the
|
By
2551phil
·
#59
·
|
|
Re: Important question, please?
@Phil: Considering all the shortcomings of Swift that you described, why did you expend the time to rewrite such a major program in Swift? Was there a benefit offsetting the shortcomings, or was it
@Phil: Considering all the shortcomings of Swift that you described, why did you expend the time to rewrite such a major program in Swift? Was there a benefit offsetting the shortcomings, or was it
|
By
Bob Stern
·
#60
·
|
|
Re: Important question, please?
I have had an iOS project on the backburner for a couple of years. I thought it’d be (as you say) a good learning experience to update an app I’d already written in Objective-C into Swift as prep
I have had an iOS project on the backburner for a couple of years. I thought it’d be (as you say) a good learning experience to update an app I’d already written in Objective-C into Swift as prep
|
By
2551phil
·
#61
·
|