Re: File Associations?
Hello Scott, Sorry to clutter things with another post but there was one thing I forgot to include: the actual content of the variables. Sometimes the exact form of a string is what trips me up so perhaps this will be helpful. I walked through the debugger as this section of code was running and copied out the contents of each variable. (disclaimer: actually I *retyped* what I saw in the debugger window... there is probably a way to copy/paste but I couldn't recall it.) -Scott Morrow tProgramFilesFolderPath --C:/Program Files/Report Card Pro tAppFolder -- C:/Program Files/Report Card Pro tAppName -- Report Card Pro.exe tAppExecutablePath --C:\Program Files\Report Card Pro\Report Card Pro.exe tDocFileExtension --.rcp tAppDocAssoc -- Report Card Pro document tDefaultIconString -- C:\Program Files\Report Card Pro\Report Card Pro.exe,1 tSubKeyDblClickDocString -- C:\Program Files\Report Card Pro\Report Card Pro.exe %1 -- local lErrorLog on SetWindowsRegistry put empty into lErrorLog put Setting the registry into fld progressInfo of cd install of stack elsoInstaller wait 1 sec set the customPropertySet of stack elsoInstaller to empty set the customPropertySet of stack elsoInstallerLib to empty -- tProgramFilesFolderPath -- the path to the Programs folder -- C:/Program Files put fld installPath of cd destination of stack elsoInstaller into tProgramFilesFolderPath -- tAppFolder -- the name of OUR folder that contains the application we are installing -- Report Card Pro set the itemDel to / put item -1 of tProgramFilesFolderPath into tAppFolder -- put the uEnclosingFolderName of stack elsoInstaller into tAppFolder -- the user has control over this part of the path -- tAppName -- the name of the executable application we are installing -- Report Card Pro put the uAppName of stack elsoInstaller into tAppName -- tAppExecutablePath -- the fileName (Full Path) of the .exe put tProgramFilesFolderPath / tAppName into tAppExecutablePath -- save the full path in case we need to launch the app just before quiting this installer set the uLaunchPath of stack elsoInstaller to tAppExecutablePath replace / with \ in tAppExecutablePath -- tDocExtension -- the dot extension that is associated with the application we are installing -- .rcp put the uFileExtention of stack elsoInstaller into tDocExtension if tDocExtension is empty then put Ther was an error attempting to set the Registry because file extension information was missing cr after lErrorLog return file extension missing exit SetWindowsRegistry end if -- -- Set the Windows Registry if necessary -- -- Check to make sure the Windows Registry is set to associate the .rcp file extension with ReportCard_Pro if queryRegistry(HKEY_CLASSES_ROOT\tDocExtension\) tAppFolder then -- there is no Registry key for the file extension -- so let's set it up --1. Create a key in HKEY_CLASSES_ROOT for the extension, and use the default value to point to the name of the application -- get setRegistry(HKEY_CLASSES_ROOT\.tst\,TestApp) get setRegistry(HKEY_CLASSES_ROOT\tDocExtension\,tAppFolder) put the result into tResult if tResult is not empty then put setRegistry error 1 tResult cr after lErrorLog -- Custom error reporting return tResult end if if lErrorLog is empty then --2. Create a key in HKCR for the application itself, using the default value to point to a descriptor of the kind of document used by the app -- this will be used in list views to show the kind of file a document of TestApp is: -- get setRegistry(HKEY_CLASSES_ROOT\TestApp\,TestApp document) put tAppFolder document into tAppDocAssoc get setRegistry(HKEY_CLASSES_ROOT\tAppFolder\,tAppDocAssoc) put the result into tResult if tResult is not empty then put setRegistry error 2 tResult cr after lErrorLog -- Custom error reporting return tResult end if end if -- lErrorLog is empty if lErrorLog is empty then --3. Create a subkey of HKCR\TestApp to hold the default icon for the application. Rev document icons are in the first position -- get setRegistry(HKEY_CLASSES_ROOT\TestApp\DefaultIcon\,C:\Program Files\TestApp\TestApp.exe,1) put tAppExecutablePath COMMA 1 into tDefaultIconString get setRegistry(HKEY_CLASSES_ROOT\tAppFolder\DefaultIcon\,tDefaultIconString) put the result into tResult if tResult is not empty then put
Re: File Associations?
Wow, Folks, this kind of stuff should be easy. Can we abstract that code into a library? Also, Scott, did you solved it for Mac? Cheers andre -- http://www.andregarzia.com All We Do Is Code. ___ 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
Re: File Associations?
Hello Scott, The relaunch handler (in the stack script of the executable) should still be in the message path even if you close the stack... unless I misunderstand the design, the executable that stack is attached to would still be in memory and running. -Scott Morrow Is it possible that the relaunch message is failing for me because I'm using a splash/data arrangement for my standalone? My splash executable launches a data stack and then closes the launching stack. Could this be why any subsequent launches of the EXE don't trigger the relaunch handler? Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
Recently, Scott Morrow wrote: This post has the scripting I use for Relaunch so that multiple instance of the app won't launch. I'm using it with a Splash-screen design as well. There are 2 script blocks, the first of which has to go at the stack level. [ snip ] Thanks Scott. I'm part way to a solution. Apparently relaunch only works with the stack bound to the engine in the splash standalone. I was trying to use it with the main stack opened by the splash app (the splash stack was immediately closed after launch). I also learned how to get the path of a double-clicked document using the environment variable $1 at startup, so if my app is launched by a document, it will load the document after launching. But I'm still facing the disassociated file issue. Documents saved by my app with a custom file extension continue to show up with the generic Windows document icon, instead of the custom icon in my standalone, and bring up the choose application dialog when double-clicked. I tried your suggestion of manually assigning the icon via file properties, and it did change (to the icon of an app somewhere else on the drive), but I'm not sure where in the registry this was updated (if at all). [sigh] Hours being sucked away by these details... Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
Andre Garzia wrote: Folks, this kind of stuff should be easy. Can we abstract that code into a library? Also, Scott, did you solved it for Mac? The problem of multiple instances doesn't happen on Macs, so you don't have to do anything on that OS. The file associations are all handled in the plist file inside the application bundle, so that isn't usually an issue either. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: File Associations?
Is it possible that app name entries in the registry need to be in 8.3 format? My app name is 31 chars long, including spaces. Maybe Vista is choking on this? Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
On Mar 3, 2010, at 3:17 PM, Scott Rossi wrote: Is it possible that app name entries in the registry need to be in 8.3 format? My app name is 31 chars long, including spaces. Maybe Vista is choking on this? You could try wrapping the name in quotes. I think you mentioned you are using INNO Setup. You will need to double-up the quotes to escape. Here is an example from my .iss file: Root: HKCR; Subkey: ScreenSteps\shell\open\command; ValueType: string; ValueData: {app}\ScreenSteps.exe %1; Flags: uninsdeletekey -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ 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
Re: File Associations?
Hi, It is right that you need to catch the relaunch message in the stack script of the stack that is opened first. This is always the stack that is embedded in the executable. It can't be any other stack. In your case, it is the splash stack. As far as I know, this is all explained in the documentation, even though it might be a bit brief. I referred to this http://qurl.tk/4x example before. It works perfectly for me, on Win 98 up to and including Vista. I don't know about Win 7 (yet). I do always use very short names for my executables. The paths always end in 8.3 DOS file names. The application names, as displayed in the Add/Remove Software control panel and in other palces, can be longer than that. I wonder whether something has changed in 4.5. I haven't used Rev 4.5 for my installer yet. Something has changed with regard to icons of Windows executables and perhaps it affects the icon that needs to be associated with your file extension. RunRev should be able to tell you this. Maybe you should post your script. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer Economy-x-Talk is always looking for new software development projects. Feel free to contact me for a quote. Op 3 mrt 2010, om 19:07 heeft Scott Rossi het volgende geschreven: Recently, Scott Morrow wrote: Thanks Scott. I'm part way to a solution. Apparently relaunch only works with the stack bound to the engine in the splash standalone. I was trying to use it with the main stack opened by the splash app (the splash stack was immediately closed after launch). I also learned how to get the path of a double-clicked document using the environment variable $1 at startup, so if my app is launched by a document, it will load the document after launching. But I'm still facing the disassociated file issue. Documents saved by my app with a custom file extension continue to show up with the generic Windows document icon, instead of the custom icon in my standalone, and bring up the choose application dialog when double-clicked. I tried your suggestion of manually assigning the icon via file properties, and it did change (to the icon of an app somewhere else on the drive), but I'm not sure where in the registry this was updated (if at all). [sigh] Hours being sucked away by these details... Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
I'm still trying to get Windows file associations on Vista worked out over here and am looking for suggestions. I've set up registry entries based on Ken Ray's tips: http://tinyurl.com/yfmdsht and everything appears to in place. But documents created by my app continue to show up as generic icons. Double-clicking them brings up the What program do you want to use to open...? dialog and my app is listed there, but I can't get Vista to properly display the document icon contained in the standalone. Also, I don't understand how to implement the following so that double-clicked documents open my app: on openStack put $0 into theAppPath put $1 into theDocToOpen -- stuff here to launch the doc in my app? end openStack Currently double-clicking my documents launches multiple instances of my app. I'm using a splash/data stack app setup, and I've tried to pass the doc name to an Open File menu routine. Does the above need to go in the splash standalone, or can it go in card script of my data stack? Am I right in passing the doc name to my Open File handler? Do I need to do something else? Thanks for any advice... Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
Are you trying to set the registry under Vista without administrative privileges? (If UAC is enabled, and it is by default, then even if you are the primary admin user of the system you won't have sufficient privileges to set the registry. If you are testing this from the IDE, before launching, right click Rev and choose to Run as administrator) If this isn't the trouble then I would be happy to send you code that I'm using in an application, though I struggled with Ken's directions (I think his directions are fine and I was glad to have the advice but my previous experience with the subject was nil) and still have no great understanding myself. For documents launching multiple instances see relaunch in the dictionary where there is a note to look at an example stack. Scott Morrow Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com -- On Mar 2, 2010, at 8:43 PM, Scott Rossi wrote: I'm still trying to get Windows file associations on Vista worked out over here and am looking for suggestions. I've set up registry entries based on Ken Ray's tips: http://tinyurl.com/yfmdsht and everything appears to in place. But documents created by my app continue to show up as generic icons. Double-clicking them brings up the What program do you want to use to open...? dialog and my app is listed there, but I can't get Vista to properly display the document icon contained in the standalone. Also, I don't understand how to implement the following so that double-clicked documents open my app: on openStack put $0 into theAppPath put $1 into theDocToOpen -- stuff here to launch the doc in my app? end openStack Currently double-clicking my documents launches multiple instances of my app. I'm using a splash/data stack app setup, and I've tried to pass the doc name to an Open File menu routine. Does the above need to go in the splash standalone, or can it go in card script of my data stack? Am I right in passing the doc name to my Open File handler? Do I need to do something else? Thanks for any advice... Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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 ___ 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
Re: File Associations?
Recently, Scott Morrow wrote: Are you trying to set the registry under Vista without administrative privileges? (If UAC is enabled, and it is by default, then even if you are the primary admin user of the system you won't have sufficient privileges to set the registry. If you are testing this from the IDE, before launching, right click Rev and choose to Run as administrator) I am using an installer (Inno Setup) to modify the registry and I am running as administrator. I believe the keys are being set correctly because I can view them using RegEdit. If this isn't the trouble then I would be happy to send you code that I'm using in an application, though I struggled with Ken's directions (I think his directions are fine and I was glad to have the advice but my previous experience with the subject was nil) and still have no great understanding myself. If you don't mind, I would like to see your code. Very little is working for me compared to what folks have explained in the mail list archives. For documents launching multiple instances see relaunch in the dictionary where there is a note to look at an example stack. In my stack, the relaunch message is apparently not being called for some reason. I've tried placing it in the stack script and in a stack script behavior, and still nothing is happening. Still trying to figure out what's going on. Thanks Scott. Regards, Scott Rossi Creative Director Tactile Media, UX Design Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com -- On Mar 2, 2010, at 8:43 PM, Scott Rossi wrote: I'm still trying to get Windows file associations on Vista worked out over here and am looking for suggestions. I've set up registry entries based on Ken Ray's tips: http://tinyurl.com/yfmdsht and everything appears to in place. But documents created by my app continue to show up as generic icons. Double-clicking them brings up the What program do you want to use to open...? dialog and my app is listed there, but I can't get Vista to properly display the document icon contained in the standalone. Also, I don't understand how to implement the following so that double-clicked documents open my app: on openStack put $0 into theAppPath put $1 into theDocToOpen -- stuff here to launch the doc in my app? end openStack Currently double-clicking my documents launches multiple instances of my app. I'm using a splash/data stack app setup, and I've tried to pass the doc name to an Open File menu routine. Does the above need to go in the splash standalone, or can it go in card script of my data stack? Am I right in passing the doc name to my Open File handler? Do I need to do something else? Thanks for any advice... Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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 ___ 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 ___ 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
Re: File Associations?
Recently, I wrote: For documents launching multiple instances see relaunch in the dictionary where there is a note to look at an example stack. In my stack, the relaunch message is apparently not being called for some reason. I've tried placing it in the stack script and in a stack script behavior, and still nothing is happening. Still trying to figure out what's going on. Is it possible that the relaunch message is failing for me because I'm using a splash/data arrangement for my standalone? My splash executable launches a data stack and then closes the launching stack. Could this be why any subsequent launches of the EXE don't trigger the relaunch handler? Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
RE: File Associations?
From: cott Rossi I'm still trying to get Windows file associations on Vista worked out over here and am looking for suggestions. I've set up registry entries based on Ken Ray's tips: http://tinyurl.com/yfmdsht and everything appears to in place. But documents created by my app continue to show up as generic icons. Double-clicking them brings up the What program do you want to use to open...? dialog and my app is listed there, but I can't get Vista to properly display the document icon contained in the standalone. Works on my XP system, but I didn't use those function calls to set it up. Instead, I manually created the association by right-clicking a file, selecting Open With, and navigating to my program. You might try removing all the keys you created with Regedit, manually create the association, and then see what the OS put there, so that you can make your program do the same thing. As to your second question, I've never tried the splash/data paradigm, so I can't help. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ 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
Re: File Associations?
Hello Scott This post has the scripting I use for Relaunch so that multiple instance of the app won't launch. I'm using it with a Splash-screen design as well. There are 2 script blocks, the first of which has to go at the stack level. The pile of comments indicates how insecure I was with the code. Below the Relaunch script is additional code I placed at the card level of the Splash-screen stack (I'm not sure it needs to be there) I'll post again about registry. - Scott Morrow -- -- In the main stack script of the Splash-screen (executable) and in fact can't be placed at the card level. Begin Relaunch Block - -- -- If the applications mainstack (not sent to the card) has a 'relaunch' handler, then Revolution will treat -- -- it as a 'single-instance' application. This means that if a second instance is launched -- -- the original instance will be sent a 'relaunch' message before the new instance starts up. on relaunch -- -- The parameters for relaunch are the command-line arguments passed when invoking the -- -- new instance. Revolution does the same processing of these as it does for the $n -- -- global variables. i.e. -- -- 1 ) It splits the command-line up into Words -- -- 2 ) Removes quotes bracketing any quoted argument -- -- 3 ) Replaces '\' with '/' -- put empty into tParamList repeat with tIndex = 1 to the paramCount -- get Log( param( tIndex ) = param(tIndex)) put param(tIndex) CR after tParamList end repeat put token 1 to -1 of tParamList into tParamList -- -- Passing the relaunch message will cause the new instance to continue to load. -- if the hilite of btn Pass Relaunch then -- get Log(Passing Relaunch) -- pass relaunch -- end if -- -- Returning background will cause the existing instance to remain in the background -- -- and the new instance to quit. -- if the hilite of btn Remain in Background then -- get Log(Relaunch and Remaining in background) -- return background -- end if -- get Log(Relaunch Processed) -- -- Try to keep processing in the relaunch handler to a minimum as the new instance -- -- waits for a reply. In particular, you must not open any windows (especially modal -- -- dialogs) as this will cause an automatic pass. -- -- Therefore, it is best to do the main part of the processing after relaunch has -- -- sent back its acknowledgement. To do this we send a message to be executed as soon as -- -- the current handler stack resolves. -- send processRelaunch param(1) to me in 0 millisecs send processRelaunch tParamList to cd 1 of me in 0 millisecs -- -- Returning empty will cause the existing instance to be brought to the front, and -- -- the new instance to quit. return empty end relaunch -- As described above, it is best to do all the processing of the relaunch *after* -- the relaunch message has been acknowledged. -- Here we just open an open-file dialog with the path passed to the command-line. -- -- Note that when a modal dialog is being displayed, you can still receive the 'relaunch' -- message. However, using messages as we have here will result in them being -- automatically queued. End Relaunch Block --- -- -- Card Level of the Splash-screen stack -- this handler recieves a list of files that caught by the Relaunch handler in the stack script -- multiple instances of this Splash executable were not allowed to launch -- and the file paths were passed along to the currently running instance of the Splash executable -- were we can open them -- this handler is nearly the same as the esOpenAppleEventDoc handler on processRelaunch tFilesPathsToOpen if tFilesPathsToOpen empty then -- there was a relaunch message handled by the stack script repeat for each line tNewDataPath in tFilesPathsToOpen -- could be multiple files VerifyClassFile tNewDataPath -- Mr. Rossi can ignore this line, I'm just verifying a file before trying to open it send PreOpenStack to stack tNewDataPath end repeat end if end processRelaunch On Mar 2, 2010, at 10:48 PM, Scott Rossi wrote: Recently, I wrote: For documents launching multiple instances see relaunch in the dictionary where there is a note to look at an example stack. In my stack, the relaunch message is apparently not being called for some reason. I've tried placing it in the stack script and in a stack script behavior, and still nothing is happening. Still trying to figure out what's going on.
Re: File Associations?
Hello Scott, I'm not using Inno Installer but a custom installer application made with Rev. Before trying to set the registry my installer has elevated itself to have administrative privileges (by adjusting the manifest with Resource Tuner as described by Trevor DeVore) I believe this is all the pertinent code from my installer application and I'm sure you will recognize Ken's instructional outline as the foundation. I've left in some code specific to my app and referenced custom properties that you would need to substitute your own data in for. Hopefully this will shed a light of Ray. (pun intended) -Scott Morrow Elementary Software (Now with 20% less chalk dust!) web http://elementarysoftware.com/ email sc...@elementarysoftware.com -- local lErrorLog on SetWindowsRegistry put empty into lErrorLog put Setting the registry into fld progressInfo of cd install of stack elsoInstaller wait 1 sec set the customPropertySet of stack elsoInstaller to empty set the customPropertySet of stack elsoInstallerLib to empty -- tProgramFilesFolderPath -- the path to the Programs folder -- C:/Program Files put fld installPath of cd destination of stack elsoInstaller into tProgramFilesFolderPath -- tAppFolder -- the name of OUR folder that contains the application we are installing -- Report Card Pro set the itemDel to / put item -1 of tProgramFilesFolderPath into tAppFolder -- put the uEnclosingFolderName of stack elsoInstaller into tAppFolder -- the user has control over this part of the path -- tAppName -- the name of the executable application we are installing -- Report Card Pro put the uAppName of stack elsoInstaller into tAppName -- tAppExecutablePath -- the fileName (Full Path) of the .exe put tProgramFilesFolderPath / tAppName into tAppExecutablePath -- save the full path in case we need to launch the app just before quiting this installer set the uLaunchPath of stack elsoInstaller to tAppExecutablePath replace / with \ in tAppExecutablePath -- tDocExtension -- the dot extension that is associated with the application we are installing -- .rcp put the uFileExtention of stack elsoInstaller into tDocExtension if tDocExtension is empty then put Ther was an error attempting to set the Registry because file extension information was missing cr after lErrorLog return file extension missing exit SetWindowsRegistry end if -- -- Set the Windows Registry if necessary -- -- Check to make sure the Windows Registry is set to associate the .rcp file extension with ReportCard_Pro if queryRegistry(HKEY_CLASSES_ROOT\tDocExtension\) tAppFolder then -- there is no Registry key for the file extension -- so let's set it up --1. Create a key in HKEY_CLASSES_ROOT for the extension, and use the default value to point to the name of the application -- get setRegistry(HKEY_CLASSES_ROOT\.tst\,TestApp) get setRegistry(HKEY_CLASSES_ROOT\tDocExtension\,tAppFolder) put the result into tResult if tResult is not empty then put setRegistry error 1 tResult cr after lErrorLog -- Custom error reporting return tResult end if if lErrorLog is empty then --2. Create a key in HKCR for the application itself, using the default value to point to a descriptor of the kind of document used by the app -- this will be used in list views to show the kind of file a document of TestApp is: -- get setRegistry(HKEY_CLASSES_ROOT\TestApp\,TestApp document) put tAppFolder document into tAppDocAssoc get setRegistry(HKEY_CLASSES_ROOT\tAppFolder\,tAppDocAssoc) put the result into tResult if tResult is not empty then put setRegistry error 2 tResult cr after lErrorLog -- Custom error reporting return tResult end if end if -- lErrorLog is empty if lErrorLog is empty then --3. Create a subkey of HKCR\TestApp to hold the default icon for the application. Rev document icons are in the first position -- get setRegistry(HKEY_CLASSES_ROOT\TestApp\DefaultIcon\,C:\Program Files\TestApp\TestApp.exe,1) put tAppExecutablePath COMMA 1 into tDefaultIconString get setRegistry(HKEY_CLASSES_ROOT\tAppFolder\DefaultIcon\,tDefaultIconString) put the result into tResult if tResult is not empty then put setRegistry error 3 tResult cr after lErrorLog -- Custom error reporting return tResult end if end if -- lErrorLog is empty if lErrorLog is empty then --4. Create
Re: File Associations?
Hi Scott, It looks like you found all the information you need. I'm using the same for an installer, which I use for quite a few different projects. There are several intresting posts about this subject in the archives of this list. On of them can be found here http://qurl.tk/4x You probably have that info already, since it is Ken's. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer Buy flowers for your Valentine and get the computer game TwistAWord for free. Visit http://www.twistaword.net or http://qurl.tk/4h Op 13 feb 2010, om 21:12 heeft Scott Rossi het volgende geschreven: Hi List: Are there any pages/docs out there that deal with setting up file associations on Win/Mac? It's been years since I've built an app that reads/writes files and I've forgotten how to manage this stuff (my knowledge was probably out of date anyway). I found Ken Ray's dev page that talks about setting up Windows file associations (still trying to get my head around using environment variables), and been through the mail archives trying to locate info about Mac app signature codes, but I'm wondering if this stuff has been compiled somewhere that I don't know about. Thanks for any pointers. Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
Recently, Mark Schonewille wrote: There are several intresting posts about this subject in the archives of this list. On of them can be found here http://qurl.tk/4x You probably have that info already, since it is Ken's. Thanks Mark. The one (?) item I'm unclear on is the script example: on openStack put $0 into theAppPath put $1 into theDocToOpen answer The doc to open is: theDocToOpen end openStack Wouldn't this execute only when the app is first launched? What message is sent to the app while the app is running? Or am I just not understanding the way this works? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations?
Scott, That's right. You double-click a file in Windows and Windows starts another instance of the executable for that file. In that executable, you catch the relaunch message. If file $1 exists, don't return any value from the relaunch handler. The new instance will be terminated and the message is passed on to the already running instance. Note that the message is sent to the already running instance. The already running instance decides whether the new instance of the executable is to be terminated or not. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer Buy flowers for your Valentine and get the computer game TwistAWord for free. Visit http://www.twistaword.net or http://qurl.tk/4h Op 13 feb 2010, om 22:15 heeft Scott Rossi het volgende geschreven: Recently, Mark Schonewille wrote: There are several intresting posts about this subject in the archives of this list. On of them can be found here http://qurl.tk/4x You probably have that info already, since it is Ken's. Thanks Mark. The one (?) item I'm unclear on is the script example: on openStack put $0 into theAppPath put $1 into theDocToOpen answer The doc to open is: theDocToOpen end openStack Wouldn't this execute only when the app is first launched? What message is sent to the app while the app is running? Or am I just not understanding the way this works? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX Design ___ 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
Re: File Associations Auto-Open with OS X
Hi Peter, Add the following handler to the main stack script: on appleEvent pClass, pID, pSender switch pClass pID case aevtodoc request appleEvent data -- extract the path of the file to open -- put here the code to process the file break default pass appleEvent end switch end appleEvent Regards, Thierry On 2005, May 10, , at 23:55, Peter Reid wrote: I've got a standalone developed with Rev 2.5.1 that I want to associate with a particular file extension for both OS X and Windows. On both platforms I can specify that all files with the extension .xyz is to be opened by a particular program. This works fine with Windows, but not with OS X (v10.3.9 by the way, in case it's relevant). In my preOpenStack handler I'm looking at the $0, $1 parameters and find that $1 is set to the name of the file I double-clicked on (.xyz) for Windows but is empty for OS X. So with OS X when the user double-clicks a .xyz data file, it opens my standalone OK but not the file itself. Is there a known solution for this for OS X so my users can simply double-click a file to cause it to open my standalone AND THEN the file they clicked on? Thanks Peter -- Peter Reid Reid-IT Limited, Loughborough, Leics., UK E-mail: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File Associations Auto-Open with OS X
Hi Thierry Thanks very much for an excellent solution - just the job! With best regards Peter Add the following handler to the main stack script: on appleEvent pClass, pID, pSender switch pClass pID case aevtodoc request appleEvent data -- extract the path of the file to open -- put here the code to process the file break default pass appleEvent end switch end appleEvent Regards, Thierry -- Peter Reid Reid-IT Limited, Loughborough, Leics., UK E-mail: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
Ian Wood wrote: On 27 Feb 2004, at 01:01, Mark Talluto wrote: On Feb 26, 2004, at 1:08 PM, Richard Gaskin wrote: I'm using the same standalone building process I've used for the last year, only now on Panther my standalones won't recognize my custom document types. Also, when I modify the core engine name within the MacOS folder and then edit my plist to match, in earlier versions of OS X this was how I got the process name to match the bundle name, only in Jaguar the same steps I'd used successfully before no longer work -- now the app simply doesn't launch. Have any of you successfully assigned custom document types to a Rev standalone under Panther w/ Rev 2.1? If so, what are you doing differently than you had done under Jaguar? I sometimes have to stuff the standalone. Then delete the original. Then unstuff to get it all to work again. On really bad cases, I file transfer the standalone to another mac and then bring it back. This always does the trick. As I mentioned recently on the list, deleting the standalone and then dragging it back out of the Trash does the same. Curious. Is this a Finder bug? Is it a known issue? -- Richard Gaskin Fourth World Media Corporation ___ [EMAIL PROTECTED] http://www.FourthWorld.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
I sometimes have to stuff the standalone. Then delete the original. Then unstuff to get it all to work again. On really bad cases, I file transfer the standalone to another mac and then bring it back. This always does the trick. As I mentioned recently on the list, deleting the standalone and then dragging it back out of the Trash does the same. Curious. Is this a Finder bug? Is it a known issue? -- Richard Gaskin Fourth World Media Corporation It is a long-standing (as long as OS7 at least) issue, although I would not call it a bug as such. The problem is to trigger Finder into updating its desktop database for a program that is already cataloged. Robert Brenstein ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
Could you edit the finder flags and turned the Inited bit off and then open the folder again? At 11:18 AM 2/27/2004, you wrote: I sometimes have to stuff the standalone. Then delete the original. Then unstuff to get it all to work again. On really bad cases, I file transfer the standalone to another mac and then bring it back. This always does the trick. As I mentioned recently on the list, deleting the standalone and then dragging it back out of the Trash does the same. Curious. Is this a Finder bug? Is it a known issue? -- Richard Gaskin Fourth World Media Corporation It is a long-standing (as long as OS7 at least) issue, although I would not call it a bug as such. The problem is to trigger Finder into updating its desktop database for a program that is already cataloged. Robert Brenstein ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 24-hour recorded info hotline: 1-800-624-7671 ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
Yes, that is one of the tricks for MAc Classic. Not sure whether still works under OSX. Robert Could you edit the finder flags and turned the Inited bit off and then open the folder again? At 11:18 AM 2/27/2004, you wrote: I sometimes have to stuff the standalone. Then delete the original. Then unstuff to get it all to work again. On really bad cases, I file transfer the standalone to another mac and then bring it back. This always does the trick. As I mentioned recently on the list, deleting the standalone and then dragging it back out of the Trash does the same. Curious. Is this a Finder bug? Is it a known issue? -- Richard Gaskin Fourth World Media Corporation It is a long-standing (as long as OS7 at least) issue, although I would not call it a bug as such. The problem is to trigger Finder into updating its desktop database for a program that is already cataloged. Robert Brenstein ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution Peter T. Evensen http://www.PetersRoadToHealth.com 24-hour recorded info hotline: 1-800-624-7671 ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
Actually I have this same problem with windows xp. I have to close a folder (or go up one level) and then reopen it to see the 'correct' version of my rev standalones every time I build a new one. When I update my OSX standalones they are updated once the the folder window is brought to the front or is already open (after a slight delay) NMEH (not my experience here) FWIW Tom On Feb 27, 2004, at 1:43 PM, [EMAIL PROTECTED] wrote: I have been a Apple/Mac aficionado since the Apple ][ days. And I have defended Apple against the Evil Windows Users in some debates that felt like a verbal Aikido sparring match. But here we are in Panther 20 years after the first Mac, and the Finder window STILL doesn't update to show a programmatically copied file unless you tickle the window by clicking in it (or using the AppleScript update folder' command)! Now that's just inexcusable. This is not a characteristic, this is a major FLAW. It is these kinds of characteristics that provide ammo to those who criticize the MacOS for not being a serious operating system. Thomas J. McGrath III SCS 1000 Killarney Dr. Pittsburgh, PA 15234 412-885-8541 ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File associations in Panther
On 27 Feb 2004, at 01:01, Mark Talluto wrote: On Feb 26, 2004, at 1:08 PM, Richard Gaskin wrote: I'm using the same standalone building process I've used for the last year, only now on Panther my standalones won't recognize my custom document types. Also, when I modify the core engine name within the MacOS folder and then edit my plist to match, in earlier versions of OS X this was how I got the process name to match the bundle name, only in Jaguar the same steps I'd used successfully before no longer work -- now the app simply doesn't launch. Have any of you successfully assigned custom document types to a Rev standalone under Panther w/ Rev 2.1? If so, what are you doing differently than you had done under Jaguar? I sometimes have to stuff the standalone. Then delete the original. Then unstuff to get it all to work again. On really bad cases, I file transfer the standalone to another mac and then bring it back. This always does the trick. -- Best regards, Mark Talluto As I mentioned recently on the list, deleting the standalone and then dragging it back out of the Trash does the same. Ian ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution