save for web name length
Hi all y'alls (or is it alls y'all?:-) Anyone know the limit of a png image Save for Web name length? I am using adobe CS2? Thanks Kathy Graves Jaqua A Wildest Dream Software San Francisco ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
save for web name length
Thanks Martin 30... Um... OK I can do that I think. kathy Graves Jaqua ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
imageSource Stored in Destination Stack
Hi y'all, I have a group of imageSources in a field. I can put the clicked on image on the clipboard. I can also copy the imageSource as an image to another stack. But, if I select the imageSource in a filed and paste it into a field in another stack I am unable to get the image stored in the Image Library of the destination stack. ( I can not reference the images as to the nature of my App.) Any Ideas? Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
imageSource Stored in Destination Stack
Hi Jim Good Idea but it is not what I need. I actually need the original copied then pasted imageSource saved in the image library at the time it is pasted. (It must be a picture of the imageSource). I don't want an image tag or a reference. (OK.., maybe I don't fully understand image tags :-) Tank you Tank you (ah bubble, bubble) for your response to this eMail. Kathy Grave Jaqua A Wildest Dream Software San Francisco ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
imageSource Stored in Destination Stack
Thanks Jacqueline, I have a field with about 350 ImageSources. I use the following format: set the clipboardData[image] to image gImage -- (this is the image the user picked) but on a Paste into the new stack I lose the image name. If I get the selection of an imageSource from the field and go to a new stack should I: 1. paste the original image and then hide it? Is it the same image as the imageSource since I have lost the image name on the paste. 2. then paste (at the mouse click) the Imagesource into the new field? What is the difference between 'copy img' and 'clipboardData[image]'? Jacqueline your great... what would we do with out you! Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Oh Christ... If I have the id of an image stored in the stack image Library how do I get the name of that image. The id is stored in a variable I call tIndex. How do I do this? Thanks Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Jacqueline, Yep...thats what I thought. Yes I am... You have no idea... I have been working on the same problem for two months now. I am going to try Ohi next... Thank you for your concern and help Kathy Graves jaqua ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Thanks all... Anyone know where the Dali Lama is right now? The Pope per chance?? And, I will try all the above suggestions. Thanks Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Ok Help Does anyOne or any Deity know how to get the name of an image source once it is buried in a field?? Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Tom Could It really be that easy? You rule... I 'll try that and get back to you. Ok, ok let's see put the ...char x of field... T H A N K Y O U Kathy Graves Jaqua ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Wow.. There is a God. Thanks Thomas and Jacque It worked. Tom, I put the imageSource of the mouseCharChunk into tIndex so this was a BIG help. ( I have about a 1000 of these imagesource and need to know which one the user might choose ;-) I think the Dali Lama impute help as well. Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Oh Christ... Image Name?
Jim and Tom to avoid return blank if no imagesource is found I am using the following: on mouseDoubleDown local tIndex if the mouseCharChunk is empty then exit mouseDoubleDown end if put the imageSource of the mouseCharChunk into tIndex --id of image if tIndex is not empty then send addImage tIndex to field Selected Images of this card in 0 millisec end mouseDoubleDown the field Selected Images is where I show the select imagesSources that a mouseDoubleDown generates. The purpose is to build a stack with a library of chosen images. This might actually work now with all the impute :-) I needed the name of the imageSource so as to select it and place it on the OS clipboard. Thanks all... Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Colors within Colors
A Big Thanks to Martin Baxter for this info. Kathy Graves Jaqua A Wildest Dream [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Lock that Kick... Hey
Hi Alls y'all, Does anyone have a simple password script. I am hiding the text fields until a password is given. The fields are on 1 card stack. The script will be in a button called Lock. My brain is locked up and I can't seem to come up with one. Thanks, Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Colors within Colors
Hi Alls Y'all, I am using the RunRev Color Palette names to help identify graphics used as imageSources. Are these Palette color names used in any other Development environments. Will other Developers know what color Thistle is? How about Gainsboro? PeachPuff... I am trying to come up with some sort of a naming system for small graphics that might give a hint at it's color scheme. Any Ideas? Kathy Graves Jaqua A Wildest Dream Software kgjaqua1@ sbcGlobal.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
clipboardData imageSource
Hi y'all I am trying to place an imageSource in the clipboard. I have a number of imageSources lined up in a field. I want to place 1 clicked-on imageSource into the clipboard. The following is not working. Help? local tImageSourceCopy put the clickCharChunk into tImageSourceCopy set the clipboardData[image] to image tImageSourceCopy Any Ideas... Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
clipboardData imageSource
Hi Chipp Thanks... I changed the script to the following and got an error saying 'no such object'. I might add that I am clicking on 1 of over 300 imageSources of verying sizes in a field. Any other Ideas? on mouseDoubleDown local tIndex if the mouseCharChunk is empty then exit mouseDoubleDown end if put the imageSource of the mouseCharChunk into tIndex choose select tool drag from topleft of image tIndex to botright of image tIndex copy choose browse tool end mouseDoubleDown Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Mac to PC without saving as a Stand Alone?
Hi y'all One more time for clarification? 1. I am a Mac User who has a new Dell running XP. Can I bring my Rev Stacks over from the Mac to the Dell and continue to program them? These stacks were originally built in Mac Classic running Panther. 2. These same stacks built in Mac Classic and running in Mac OS X Panther (non classic) seem to have a bug which turns the object inspector palette black. Is this due to the fact that I built these stacks on different platforms; this is to say, Mac Classic to non Mac Classic? Any Ideas why this bug is happening and how to get rid of it? (Raid bug spray does not work :-) Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Mac to PC without saving as a Stand Alone?
Thank you Mark, Stephen, and Thomas. I will take the Stacks to Monterey for the Black inspectors palette problem. In the mean time, I will continue struggling with the new Dell PC. I am trying to get a jump on the new intel chip :( Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Graphic in Field
Hi Glen: I did this In a field and it works quite well :-) ( or How He did It by Baron Von Frankstein) First: I made two images by taking a screen shot of: (If you have iCal on the Mac you can get a variety of colors) 1. A check box button unchecked and I called it Aqua NoChButton.png 2. A check box button checked and I called it Aqua CheckedButton.png I found that I needed to replace a character already typed in a line ( in my case it was the number of the line placed in character 1 of that line) with the imageSource Aqua NoChButton.png I used the following script to place the imageSource Aqua NoChButton.png: on addSourceImage --if line 1 of me 1 then put 1 into line 1 of me --if the imageSource of line 1 of me is empty then set the imageSource of char 1 of line 1 of me --Aqua NoChButton.png put the number of lines in me into tCount add 1 to tCount put tCount return after me set the imageSource of char 1 of line tCount of me to Aqua NoChButton.png end addSourceImage Second: Then on a mouseclick In the field I toggle the two images to make it appear As if it is a check button on mouseDown -- the first two lines are used to delete the imageSource if needed get the clickLine if the controlKey is down then delete the clickLine -- Line 3: gets the line number and puts it into the field line put the value of the clickLine into tclickLine if the imageSource of line tclickLine of me is Aqua NoChButton.png then set the imageSource of char 1 of line tclickLine of me to Aqua CheckedButton.png else if the imageSource of line tclickLine of me is Aqua CheckedButton.png then set the imageSource of char 1 of line tclickLine of me to Aqua NoChButton.png end if end if end mouseDown Third: If you Delete the check box imageSource you want to reline or reorder the field lines in the correct sequence use the following script: (Mark Wieder gave me this last script) on fixLines -- action can occure when field is locked or unlocked get number of lines in me put true into trailing repeat while it 0 if the number of words in line it of me is not 0 then put false into trailing else if trailing then delete line it of me else delete line it of me end if subtract 1 from it end repeat end fixLines Hope this helps: Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Problems with Importing multiple images
OK : ) Thanks to the following Help I fixed all my problem Stacks. STEP 1: (Resetting the previous Image IDS--instant fix) By Chip: Try starting with a high 6 digit number for the first image you import, then add 1 to it and set the next image's ID to it. I think this should solve your problem. OR create a button after you've loaded all your images and set the script of it to: on mouseUp -- CREATE A RANDOM HIGH STARTING ID put 123456 into tID repeat with y = 1 to the number of cards in this stack go cd y repeat with x = 1 to the number of images on this card set the id of img x to tID add 1 to tID end repeat end repeat end mouseUp STEP 2: (New Imported Images IDs) BY Thomas McGrath III: Change Image ID's on immediately on import (espically File imports) Change icon IDs in buttons that contain the graphic or use the short name property set the icon of button mybutton to {imageID | imageName} STEP 3: (Where to set the New Imported Images IDs) BY Jim Lyon To change the id of the new imported Image open The property inspector and make the change by (adding 1 to the last number or setting to some large number) Step 4: (I Think...) And Thanks, Xavier we have all had similar problems with that pesky send button. Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Problems with Importing multiple images
Hello to all out there in Computer Land, This is one of the greatest discussion lists I have ever had the privilege to witness. RunRev is an exciting environment.:) Can hardly wait until Monterey! Is there a limit to the number of images one can Import to a stack or cards in a stack? The problems I am having are as follows: I imported 25 images into a 2 card Stack. Numbers 1 to 20 are correct. but 21(a small png image) was replaced by the 210073 spinning arrow icon and image 23 (a small gif image) was replaced by a Double Arrowed Cursor id 202614. When I switched between the 2 cards the position of the imported images in the Image Library had changed. After 25 Imported Images the Image Library corruption (?) caused my RunRev palette to stop working. Is there a difference in importing from the Image Library as opposed to the File Menu? Call me silly... but, does this mean I should only have single card substacks with 20 images each? I can do this but I am dealing with about 250 + Imported Images to get different looks and animation effects. (Of course I world like to have 500 Imported Images but being an old softy I don't want to push my luck;) I'm using 2.5.1 RunRev from a Mac OS X 10.3.9 Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Problems with resource mages
Doc Semi-related question for the tests I've been running: Using the application browser, I noticed that the pre-load into memory property is automatically set for all images that I import from a folder. Is there a way to avoid this if I wanted to import 100 or even 1000 images to the stack or would I have to manully unselect the properties for each one? Thanks to all, Doc- Hi Doc I'm having a similar problem in that I can't import more then 20 Images without a mistake in the Image Library. After 20 Images runRev icons or cursors begin to take the place of my Imported Images. Maybe the pre-load into memory property is a problem ??? Kathy Graves Jaqua San Francisco Ca A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Problems with Importing multiple images
Thanks Chip for answering my quarry. :) I will use this great script. Do you think the alwaysBuffer property which I set to true in the Stack Inspector during the Image importing could be adding to this Importing corruption as well? As you know: alwaysBuffer property (true-False) Determines whether the contents of windows, players, and images are buffered offscreen. global bufferHiddenImages property (true-False) Specifies whether images that are not visible are decompressed into an offscreen buffer. If yes besides deselecting alwaysBuffer in the Stack Inspector, would I also set the above Global to False. Kathy Graves Jaqua ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Lists and Custom Properties
Hi Dick, Thank you. I am somewhat new at this myself. I figure out this Custom Prop script last week. This correction does help the script run faster, So you response is of great help to me:) I should do this more often, Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] --There's always one more bug. --When the field has more than one line, that code fails. --If you really want to delete each line one at a time, --repeat with x = number of lines in me down to 1 --But the following is easier and faster: --put empty into me -- Dick ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Card Group Label Names
Thank You Brian, I just got back from the Warriors Game. Wow, what a great new team! so I will work on this script:) Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] -- Kathy, How about something like this: put the groupNames into allGroups put the backgroundNames into backgroundGroups put empty into cardGroups repeat for each line groupName in allGroups if (groupName is not among the lines of backgroundGroups) then put groupNamereturn after cardGroups end if end repeat delete last char of cardGroups answer cardGroups HTH, Brian Hi y'all (I am having some Browser problems. I hope this is not a repeat.) I need a list of the labels of the groups of a card whose background behavior is set to false: I got as far as the following script: put the groupNames of card 1 into groupsToShow answer groupsToShow And, of course I get the group id of both background and card groups. So an hour later (Did I mention I was blond;) I decided to ask the following on line: How do I get the Labels of just the card groups? Thanks Kathy Graves Jaqua A Wildest Dream Software kgjaqua1 at sbcglobal.net ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Lists and Custom Properties
Hi Gary: Richard Gaskin rules:) You can store a custom property in a Stack, Card or Field Inspector and call it with a Mouse Handler: put The text I want to put in line uCustomProp . into line # of field name of this card of this stack -- Example 1-- I have done this in a popUp field. As an example: You might want to store the number of times the stack was opened. In the stack inspector under Basic Properties scroll down to Custom Properties click on the '+' sigh Enter the property name uEnterThisStack = This is your custom property for that stack on preOpenStack: if the owner of the target is me then get the uEnterThisStack of this stack -- get the value of your custom prop put it into tCount add 1 to tCount set the uEnterthisstack of this stack to tCount --adds 1 to your custom prop end if (dont pass preOpenStack or you will get 2 added to tCount:) end preOpenStack --- Now in the popUp field: on mouseDown enterThisTemplate --handler used to display the count in a popUp field end mouseDown on enterThisTemplate get the uEnterThisStack of this stack put it into tCount put Number of Times Template was Opened tCount . into line 1 of me end enterThisTemplate --Example 2- For multiple lines: (line 1 the Time, line 2 the Date, line 3 number of times stack is opened) on mouseDown -- since new text is placed in the field each time the button is clicked -- you need to clear out the old lines repeat with x = 1 to the number of lines in me delete line x of me end repeat add your text--- put Time: the time into line 1 of me put Today's Date: the long date . into line 2 of me put File: the short name of this stack into line 3 of me enterThisTemplate --your handler calling your custom prop: uEnterThis with your text end mouseDown on enterThisTemplate --if the owner of the target is me then get the uEnterThis of this stack put it into tCount put Number of Times Template was Opened tCount . into line 4 of me --end if end enterThisTemplate eMail an example and I will try to do it for you :-) Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Card Group Label Names
Hi y'all (I am having some Browser problems. I hope this is not a repeat.) I need a list of the labels of the groups of a card whose background behavior is set to false: I got as far as the following script: put the groupNames of card 1 into groupsToShow answer groupsToShow And, of course I get the group id of both background and card groups. So an hour later (Did I mention I was blond;) I decided to ask the following on line: How do I get the Labels of just the card groups? Thanks Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
custom prop by 1's?
OK 1 more time, Maybe this time I will get it. I set a customProp in my stack called cEnterToDoProp This is the number of time the Stack is opened. (Like how hard is this?:) in a preOpenStack: get the cEnterToDoProp of this stack put it into tCount add 1 to tCount set the cEnterToDoProp of this stack to tCount This adds 2 not 1 to my total. How do I add 1 to my total =cEnterToDoProp. Thanks Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
custom prop by 1's?
Thank's Richard, OK I found it. I might also mention that the resulting Answer Box contents was as long as I have ever seen. Oh my... Kathy Graves Jaqua [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Open an Application from within RR-Andre's a Genius 3
An example of using appleScript from Run Rev to open an Application and check the result (in case it was not installed is the Mac OS 9, OS X) Ken this is a great example of RunRev's ability to use appleScript. This line by line explanation was of great help to me on many levels. If you don't mind I am going to forward this to Dan Shafer for future publication inclusion considerations. It will help many others like myself who are new to appleScript calls using the Transcript Language. I know it took your valuable time to carefully explain each step. It's also a good example of offsets and function calls. (It's been years sense hyperCard and a lot of us are a little rusty.) We need more of these examples and I hope runRev is listening :) Again many Thanks. Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] The scripts to which I have been referring are as follows: A. From Andrew Garzia (using appleScript only) B. From Ken Ray (calling appleScript from RunRev or MetaCard) A. Opens the Application iCal (Traditional appleScript) Kathy try putting this on a field called myscript: tell application iCal activate end tell put a button with the following script on mouseUp do field myscript as applescript end mouseUp --- B. Opens Application iCal and checks to see if it is open (Using Transcript to call Applescript) OK, Kathy, no problem. You already know from Andre's script that you can use Rev to run an AppleScript, just as if you'd done it in Apple's Script Editor application. The AppleScript is executed by Rev using the syntax: do scriptText as AppleScript where scriptText is the script you want to execute. As you are currently doing, you can provide the script by using the contents of a field. But you can also provide using a variable. So your Open iCal script (which is currently sitting in a field) could also be executed like this: on mouseUp put tell application quote iCal quote return \ activate return end tell into tScript do tScript as AppleScript end mouseUp This would mean you could remove that extra field if you wanted to because it's all in the script. The nice thing about Rev is that you can do certain things to shorten the script and/or make it more readable. For example, return can be replaced with cr (which does the same thing), and I personally don't like typing quote quotedString quote in a script (especially if I'm doing it a lot), so I created a function called q that puts quotes around things: function q pWhat return quote pWhat quote end q (BTW: I forgot to include this function with my last email - sorry...) Additionally, you can use the backslash character to break script lines for readability. I do this with things like AppleScript so that one visible line in Transcript corresponds to one visible line in AppleScript. You don't have to do this, but I happen to like it. So your Open iCal script can now look like this: on mouseUp put tell application q(iCal) cr \ activate cr \ end tell into tScript do tScript as AppleScript end mouseUp So the code I'd sent you: function isAppRunning pAppname replace .app with in pAppName put tell application q(Finder) cr \ return the processes \ cr end tell into tAS do tAS as AppleScript put the result into tProcs return (offset(process q(pAppName),tProcs) 0) end isAppRunning Would be called like this: on mouseUp if isAppRunning(iCal) then answer iCal's running! else answer iCal's not running. end if end mouseUp And the code does this (I'm adding line numbers for clarity): 1: function isAppRunning pAppname 2:replace .app with in pAppName 3:put tell application q(Finder) cr \ return the processes \ cr end tell into tAS 4:do tAS as AppleScript 5:put the result into tProcs 6:return (offset(process q(pAppName),tProcs) 0) 7: end isAppRunning In line 1, we pass in the name of the application we want to check as a parameter to the isAppRunning function. The name can either be the short name of the application (like iCal) or the name of the application with its extension (iCal.app). In line 2, since the AppleScript that runs returns a list of running applications *without* their extensions, I want to eliminate the .app if for some reason it was passed to the function, so I call the replace command to do that job. Lines 3 to 4 you are more familiar with, in that they run an AppleScript that returns the list of running processes (applications). Whenever AppleScript returns a value, Rev can retrieve that value by checking the result right after the AppleScript is called. Line 5 does this, and puts the list of running applications into the local variable 'tProcs'. In line 6 we check to see if the application name that was passed into the function exists in the list of
AppleScript and a
An example of using appleScript from Run Rev to open an Application and check the result (in case it was not installed is the Mac OS 9, OS X) Ken this is a great example of RunRev's ability to use appleScript. This line by line explanation was of great help to me on many levels. If you don't mind I am going to forward this to Dan Shafer for future publication inclusion considerations. It will help many others like myself who are new to appleScript calls using the Transcript Language. I know it took your valuable time to carefully explain each step. It's also a good example of offsets and function calls. (It's been years sense hyperCard and a lot of us are a little rusty.) We need more of these examples and I hope runRev is listening :) Again many Thanks. Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] The scripts to which I have been referring are as follows: A. From Andrew Garzia (using appleScript only) B. From Ken Ray (calling appleScript from RunRev or MetaCard) A. Opens the Application iCal (Traditional appleScript) Kathy try putting this on a field called myscript: tell application iCal activate end tell put a button with the following script on mouseUp do field myscript as applescript end mouseUp --- B. Opens Application iCal and checks to see if it is open (Using Transcript to call Applescript) OK, Kathy, no problem. You already know from Andre's script that you can use Rev to run an AppleScript, just as if you'd done it in Apple's Script Editor application. The AppleScript is executed by Rev using the syntax: do scriptText as AppleScript where scriptText is the script you want to execute. As you are currently doing, you can provide the script by using the contents of a field. But you can also provide using a variable. So your Open iCal script (which is currently sitting in a field) could also be executed like this: on mouseUp put tell application quote iCal quote return \ activate return end tell into tScript do tScript as AppleScript end mouseUp This would mean you could remove that extra field if you wanted to because it's all in the script. The nice thing about Rev is that you can do certain things to shorten the script and/or make it more readable. For example, return can be replaced with cr (which does the same thing), and I personally don't like typing quote quotedString quote in a script (especially if I'm doing it a lot), so I created a function called q that puts quotes around things: function q pWhat return quote pWhat quote end q (BTW: I forgot to include this function with my last email - sorry...) Additionally, you can use the backslash character to break script lines for readability. I do this with things like AppleScript so that one visible line in Transcript corresponds to one visible line in AppleScript. You don't have to do this, but I happen to like it. So your Open iCal script can now look like this: on mouseUp put tell application q(iCal) cr \ activate cr \ end tell into tScript do tScript as AppleScript end mouseUp So the code I'd sent you: function isAppRunning pAppname replace .app with in pAppName put tell application q(Finder) cr \ return the processes \ cr end tell into tAS do tAS as AppleScript put the result into tProcs return (offset(process q(pAppName),tProcs) 0) end isAppRunning Would be called like this: on mouseUp if isAppRunning(iCal) then answer iCal's running! else answer iCal's not running. end if end mouseUp And the code does this (I'm adding line numbers for clarity): 1: function isAppRunning pAppname 2:replace .app with in pAppName 3:put tell application q(Finder) cr \ return the processes \ cr end tell into tAS 4:do tAS as AppleScript 5:put the result into tProcs 6:return (offset(process q(pAppName),tProcs) 0) 7: end isAppRunning In line 1, we pass in the name of the application we want to check as a parameter to the isAppRunning function. The name can either be the short name of the application (like iCal) or the name of the application with its extension (iCal.app). In line 2, since the AppleScript that runs returns a list of running applications *without* their extensions, I want to eliminate the .app if for some reason it was passed to the function, so I call the replace command to do that job. Lines 3 to 4 you are more familiar with, in that they run an AppleScript that returns the list of running processes (applications). Whenever AppleScript returns a value, Rev can retrieve that value by checking the result right after the AppleScript is called. Line 5 does this, and puts the list of running applications into the local variable 'tProcs'. In line 6 we check to see if the application name that was passed into the function exists in the list of
AppleScript from RunRev, An Example (Andrew and Ken)
An example of using appleScript from Run Rev to open an Application and check the result (in case it was not installed is the Mac OS 9, OS X) Ken this is a great example of RunRev's ability to use appleScript. This line by line explanation was of great help to me on many levels. If you don't mind I am going to forward this to Dan Shafer for future publication inclusion considerations. It will help many others like myself who are new to appleScript calls using the Transcript Language. I know it took your valuable time to carefully explain each step. It's also a good example of offsets and function calls. (It's been years sense hyperCard and a lot of us are a little rusty.) We need more of these examples and I hope runRev is listening :) Again many Thanks. Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] The scripts to which I have been referring are as follows: A. From Andrew Garzia (using appleScript only) B. From Ken Ray (calling appleScript from RunRev or MetaCard) A. Opens the Application iCal (Traditional appleScript) Kathy try putting this on a field called myscript: tell application iCal activate end tell put a button with the following script on mouseUp do field myscript as applescript end mouseUp --- B. Opens Application iCal and checks to see if it is open (Using Transcript to call Applescript) OK, Kathy, no problem. You already know from Andre's script that you can use Rev to run an AppleScript, just as if you'd done it in Apple's Script Editor application. The AppleScript is executed by Rev using the syntax: do scriptText as AppleScript where scriptText is the script you want to execute. As you are currently doing, you can provide the script by using the contents of a field. But you can also provide using a variable. So your Open iCal script (which is currently sitting in a field) could also be executed like this: on mouseUp put tell application quote iCal quote return \ activate return end tell into tScript do tScript as AppleScript end mouseUp This would mean you could remove that extra field if you wanted to because it's all in the script. The nice thing about Rev is that you can do certain things to shorten the script and/or make it more readable. For example, return can be replaced with cr (which does the same thing), and I personally don't like typing quote quotedString quote in a script (especially if I'm doing it a lot), so I created a function called q that puts quotes around things: function q pWhat return quote pWhat quote end q (BTW: I forgot to include this function with my last email - sorry...) Additionally, you can use the backslash character to break script lines for readability. I do this with things like AppleScript so that one visible line in Transcript corresponds to one visible line in AppleScript. You don't have to do this, but I happen to like it. So your Open iCal script can now look like this: on mouseUp put tell application q(iCal) cr \ activate cr \ end tell into tScript do tScript as AppleScript end mouseUp So the code I'd sent you: function isAppRunning pAppname replace .app with in pAppName put tell application q(Finder) cr \ return the processes \ cr end tell into tAS do tAS as AppleScript put the result into tProcs return (offset(process q(pAppName),tProcs) 0) end isAppRunning Would be called like this: on mouseUp if isAppRunning(iCal) then answer iCal's running! else answer iCal's not running. end if end mouseUp And the code does this (I'm adding line numbers for clarity): 1: function isAppRunning pAppname 2:replace .app with in pAppName 3:put tell application q(Finder) cr \ return the processes \ cr end tell into tAS 4:do tAS as AppleScript 5:put the result into tProcs 6:return (offset(process q(pAppName),tProcs) 0) 7: end isAppRunning In line 1, we pass in the name of the application we want to check as a parameter to the isAppRunning function. The name can either be the short name of the application (like iCal) or the name of the application with its extension (iCal.app). In line 2, since the AppleScript that runs returns a list of running applications *without* their extensions, I want to eliminate the .app if for some reason it was passed to the function, so I call the replace command to do that job. Lines 3 to 4 you are more familiar with, in that they run an AppleScript that returns the list of running processes (applications). Whenever AppleScript returns a value, Rev can retrieve that value by checking the result right after the AppleScript is called. Line 5 does this, and puts the list of running applications into the local variable 'tProcs'. In line 6 we check to see if the application name that was passed into the function exists in the list of
Open an Application from within RR
Is there a script to open (Launch) the MacOS X iCal Application from a button within RunRev. I am still using 2.2.1 but will update later. tank ya tank ya (lot's of Bubbles:) Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Open an Application from within RR
Hi Andre It's nice to hear from you to. Thank you but I have no idea what you just wrote. (Yes, It's me:) I want the user to be able to open the iCal Application from a button that they click on. I don't know Apple Script. Do you have a button RunRev script? (and see no C--pretend your an old hyperCard person;) Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Open an Application from within RR-Andre's a Genius
Andre So what took you so long--at least a minute has past. Can we try for 15 seconds next time!! Yes This worked and I think you just taught me Apple Script as well. I'm at luv and kisses now. Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Open an Application from within RR-Andre's a Genius
Andre or... How can I tell if the application iCal is opened? Maybe they deleted it or something. Is there a script to check this so I can give them a dialog box suggesting they might reinstall the application. Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Open an Application from within RR-Andre's a Genius
Thanks Ken, You guys are so bright! This genius list is growing. So where should I place your learned following script: (which I might add is just a tiny bit over my head ;) function isAppRunning pAppname replace .app with in pAppName put tell application q(Finder) cr return the processes \ cr end tell into tAS do tAS as AppleScript put the result into tProcs return (offset(process q(pAppName),tProcs) 0) end isAppRunning So what exactly does this script do; since I understood-- lets see; replace, with, put, cr...Umm-- shall I go on with this list. All kidding aside I really want to learn this script! I now have this button open iCal that say: on mouseUp do field myscript as applescript end mouseUp field myscript: tell application iCal activate end tell Now what do I do? Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Scrolling a Card?
Is it possible to scroll a card that is longer and/or wider then the screenRect? What property would I use? Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Scrolling a Card ?
This is a good start thanks Jeanne Ken! You have saved me a week! Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
dragDrop -- dragData(image)
I can dragDrop -- dragData(text) to a target from a substack to a stack. I would like to dragData[image] from a substack or palette and dragdrop it on a card. The image Gold SqHalf.png is in the stack's image library The following does not work: on mouseDown set the dragData[image] to Gold SqHalf.png end mouseDown on dragEnd send choose browse tool to me in 1 tick end dragEnd Where do I put the following dragEnter and dragDrop script (Which of course after working 2 days dose not work either)? on dragEnter set the acceptDrop to true end dragEnter on dragDrop create image the dragData[image] end dragDrop I am, to say the least, having a problem with the concept of creating an image on a card using an image located in the stacks image library? How can I correct the dragDrop message? Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: topLevel vs. open stack
Dan and Richard In the MetaCard Manual pg 349, Toplevel stacks have a mode of 1 or 2(depending on weather they have their cantModify property set to false or True repspectively). So, could it be mode 2? Kathy Graves Jaqua A Wildest Dream Software ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RevConference: Gold and Silver Found in San Francisco
RevConference: Gold and Silver Found in San Francisco There is gold in them there hills! One focus of the Conference was to show the success of the RunRev community of developers. We were introduced to a variety of exciting, groundbreaking applications. One developer showed his new well written application bring a high 6 figure income. Because of revolutions power and ease of use, he apparently spent a relatively short time in development. (As if I could do that, oh sure I don't think so:) Eureka! With RunRev XTalk languages are here to stay! With extraordinary talent, clarity and humor; the staff and speakers (RR web support gurus) showed the rich range of features contained in RunRev. As a result I found a renewed TRUST in the longevity of XTalk programming threw Revolution. And Silver too! The well organized RunRev conference was held at the beautiful Argent hotel. The speakers were the very best in the profession, I loved every minute. Great food, friendly people--can we have 3 days next time? I did mention good food didn't I? Kathy Graves Jaqua A Wildest Dream Software I've got to brush up on my Latin :) ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Stacks 'Winking Out' or Hiding Behind BackDrop
Re: Stacks 'winking out' or hiding behind backDrop. I am not sure if this is a bug. To keep the backDrop present; that is, set to black, one must keep in mind the message passing order. In HyperCard-remember the old days-we RESUME to the Card then the Stack. So try: In Stack Script: on openCard set the backDrop to Black pass openCard end openCard on suspend set the backDrop to none pass suspend end suspend on resume send openCard to this stack in 1 millisecond pass resume end resume I seem to remember that to avoid confusion when sending an 'on resume' or 'on resumeStack' message handler we put some 'resume' commands into a 'themOldHandlerBlues' message handler. This 'themOldHandlerBlues' handler is sent to openCard 'on resume'. So Try: on themOldHandlerBlues set the backDrop to Black end themOldHandlerBlues on openCard -- other openCard stuff here themOldHandlerBlues pass openCard end openCard I just discovered Revolution and find it delightful. Developing software in X-Talk languages again is a bright spot in my life. I think this will work in Revolution. (Did I mention I Think? I mean I Hope:) Kathy Graves Jaqua A Wildest Dream Software [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution