• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript Studio Help (Kinsella, John R.)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript Studio Help (Kinsella, John R.)


  • Subject: Re: AppleScript Studio Help (Kinsella, John R.)
  • From: email@hidden
  • Date: Wed, 9 Jan 2002 00:41:12 -0800

Well, I have waited a day and I haven't seen anyone else take a try at
this so here goes.

This is complete speculation, so if anyone else can confirm or deny my
theory I would appreciate it.

I would say that your 'numbers' in the text fields are not being seen as
integers, but rather strings. Try doing something like:

set startNum to contents of text field "startingIP" as integer

Like I said, this is just wild speculation that seems like it should
work. I don't have AS Studio to try this out on.

Doug


> Message: 8
> Date: Tue, 08 Jan 2002 14:01:43 -0600
> From: "Kinsella, John R." <email@hidden>
> Subject: AppleScript Studio Help
> To: "'email@hidden'"
> <email@hidden>
>
> All,
> I'm attempting to create a script that will ping, and if the ping is
> successful traceroute Ip's at or institution in order to clean up our
> badly
> out of date Ip tables. (I know, we're working on going DHCP) In
> anycase, I
> wrote an AS that works just fine and thought, well, maybe I'll just use
> it
> in AS Studio and build a nice little front end to it. But I've seince
> run
> into a roadbloack and could use some help.
> this is what i wanted to do:
>
> on clicked
> tell window "Window"
> set startNum to contents of text field "startingIP"
> set endNum to contents of text field "endingIP"
> set theSubnet to contents of text field "theSubnet"
> end tell
>
> repeat until startNum is greater than endNum
> --perform ping and traceroute finctions here
> set startNum to startNum + 1
> end repeat
> end clicked
>
> but when I do so, I continually get InternalScript Error (8) and the
> error
> winding in project builder says "[712] *** -[NSshortNumber length]:
> selector
> not recognized"
>
> what am I missing? What can't I simply add 1 to a variable? if I
> display a
> dialog with that variable before I attempt to add 1, it displays
> correctly,
> so I know the variable is being set, but for some reason the attempt to
> add
> 1 is causing an issue. Please help!!


  • Prev by Date: Re: Parameters with run handler
  • Next by Date: Re: Applescript and VBA
  • Previous by thread: Re: Parameters with run handler
  • Next by thread: Get front app from OS X script menu
  • Index(es):
    • Date
    • Thread