• 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
referencing a variable from another?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

referencing a variable from another?


  • Subject: referencing a variable from another?
  • From: James Burns <email@hidden>
  • Date: Fri, 31 Jan 2003 21:24:50 -0500

Hello:

I'm just starting out relearning AppleScript, Please bear with me.

I'm trying to use one variable, which contains the name of a second variable, to change the value of the "named" variable. Make sense?

Here's the snippet I'm working on:

...

set RGBname to "SaveRGBImagesPrefix"
set FirstFrame to "FirstFrame"
set LastFrame to "LastFrame"
set FrameStep to "FrameStep"

set stuffToGet to {RGBname, FirstFrame, LastFrame, FrameStep}
log stuffToGet
repeat with x in stuffToGet
set searchWord to x
try
set text item delimiters to return
set i to text items of fileContents
repeat with foundIt in i
if foundIt contains searchWord then
log "Found line is " & foundIt
set text item delimiters to " "
set cleaned to (text items 2 thru -1 of foundIt) as string
log cleaned

HERE"S WHERE I NEED TO ASSIGN THE VALUE HELD IN CLEANED TO THE VARIABLE CONTAINED IN SEARCHWORD

exit repeat
end if
end repeat
set text item delimiters to oldDelims

on error what
set text item delimiters to oldDelims
display dialog "Sorry. " & what
end try

...


Thanks in advance for any help.

-----
James Burns
http://www.jamesburnsdesign.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Why are compiled scripts slower than from Script Editor?
  • Next by Date: osascript(1)
  • Previous by thread: Re: Why are compiled scripts slower than from Script Editor?
  • Next by thread: osascript(1)
  • Index(es):
    • Date
    • Thread