I have just creating a game that is played on the web (with shockwave player DCR)
I wanted to make HIGHSCORE.txt lingo, for the game.
As for projector.exe: I can use getpref and setpref lingo command, no problem.
But for the game DCR on the web, the getpref and setpref seemed to be not working,
There's no highscore.txt created within the web folder. What should I do?
getpref() and setpref() do generally work well in Shockwave, I'm don't know what folder you are looking for the text file in but according to the Adobe docs here is where the text file is saved:
Windows Shockwave
..\Documents and Settings\\Application Data\Adobe\Shockwave Player \Prefs\
MAC Shockwave
~/Library/Application Support/Adobe/Shockwave Player/Prefs
setpref() can fail if the user is running in an environment with especially restrictive security settings but that is rare. Full docs here http://help.adobe.com/en_US/Director/11.5/UsingScripting/WSc3ff6d0ea77859461172e0811d64c1a1b3-7ecf.html
Related
I am having a lot of issues following this video tutorial. I'm getting hung up on the AppDelegate.applescript file. AppleScript Facelift
Here are the steps I'm taking:
1. Create a new project
2. Then I choose "App"
3.1 Options for interface
3.2 Options for Language
Save to file location - can't attach an image due to limit
5. "Template" files created
6. I can add frameworks and libraries (not sure if this is necessary? im doing things blindly...)
7. Then these are the AppDelegate files. (note- I can change the identity and type in the top right fields. if I select AppleScript Uncompiled Source, it does not change the extension)
I've tried creating a new "blank file" and saving it as AppDelegate.applescript, but I don't think this is working. Can someone point me in the right direction???
I've been working on an AppleScript project which works with my Apple Music. Someone mentioned I should look into Objective-C AppleScript, but this is making no sense. I think my end goal is having a window that allows more flexibility with input...
Thanks in advance!
The answer: I was taking a very dated approach to this and asking the wrong question.#has's suggestion to look at his project Swift-AppleScriptObjC is exactly what I needed.
I am letting user record audio from mic to .acc file
at the moment they are saved to default app document folder
in plist i enabled "supports opening documents in place"
Now in iPhones File App i can see my apps folder in Documents and also see and listen to the recorded .acc file
great... but...
Now the user can also see and then edit / mess with ini files and other files i dont really want them o see or edit etc...
So now this isnt a good solution.
So where do i save recorded audio so that users can still see them, find them on their phone, listen and share them with friends (without being to see the apps other files)?
For any files that don't need to change, just keep them as resources in your app bundle and load them from there at runtime.
For files that are generated at runtime (not at build-time) or config files that change, which you don't want to be exposed, put them in Application Support instead of in Documents.
In Objective-C:
NSArray * appSupportURLs = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationSupportDirectory
inDomains:NSUserDomainMask];
In Swift:
let appSupportURLs = FileManager.default.urls(for: .applicationSupportDirectory,
in: .userDomainMask)
This Apple Developer video pretty much covers it: https://developer.apple.com/videos/play/tech-talks/204/
Does anyone know what app is writing to file "%TEMP%\Encoding Time.csv"? The file is constantly growing. Searching Internet did not yield any meaningful results. Below is an example of the records in the file.
0x1B959F08, 37033756854966440, 11792153, 11792156, 3, 640x360
0x1B959F08, 37033756855766744, 11792232, 11792236, 4, 640x360
0x1B959F08, 37033756856405856, 11792303, 11792306, 3, 640x360
I have also come across this file, I discovered it is created by Skype for Business by deleting the file and having it re-create during a skype video meeting. I'm not sure why it is created or how to disable it though.
Seems like Microsoft Teams can create this too (since the video conference is based on Skype). This showed up for me after I set a custom background.
Sample line:
0x0000024088504A10, 37960914834869640, 204351, 204361, 10, 1920x1080
The last column is the dimensions of the background image.
The "Encoding Time.csv" is created by Skype and/or Microsoft Teams. It appears to be some kind of debug information for video/screen rendering.
It is safe to delete manually, or can also be removed during Disk Cleanup if "Temporary Files" is checked.
My app allows for a text file to be emailed to other users with or without images and audio. When there's no images or audio, then the app sends the text file "as is" with a custom extension (e.g. text.xxx). When there's audio and images, the app zips the text file along with the images and audio into a file named something like text.xxx.zip.
Prior to iOS 6 this worked fine. Pre iOS 6, the app was given the URL of the text.xxx.zip file. Now, with iOS 6, it appears that the file is already unzipped by Mail, and only the text.xxx is sent to the openURL handler.
Does anyone out there have any experience with this? Suggestions for a better approach? I'm thinking I'll need to come up with a unique extension for the zipped case...
So after pounding my head on this for the last 24 hours or so, this is what "solves" the problem:
1) Change any existing attachment filenames from test.xxx.zip to test.zip. It looks iOS6 Mail is assuming that anything of the form filename.xxx.zip, is really just a compressed version of filename.xxx. (Maybe that's a standard somewhere?) Also noted that if I changed the filename to test.yyy.zip it then said it couldn't open the attachment. (presumably since no one registered for the ".yyy" extension).
2) Rewrite code to not use .zip extension in the future to prevent similar issues.
I also discovered that for multiple document types (e.g., .xxx, .zzz) you must specify a different mime type for each in the UTI declaration - otherwise Mail appends the first UTI extension it finds to the object and then calls openURL. So, in other words, if you're set up to handle a flat file (.xxx) and a zip file (.zzz), but you use the same mime type (e.g. application/myappname) and "xxx" is defined first, when openURL is called for your file "test.zzz", it will actually pass it to openURL as "test.xxx".
I need to take different action depending on the version of Flash Player installed on OS X (due to a Flash bug). Is there a way to programmatically ascertain the version number?
I am using WebKit for this, BTW.
EDIT:
I also tried
NSBundle* myBundle = [NSBundle bundleWithPath: #"/Library/Internet Plug-Ins/Flash Player.plugin/Contents/Info.plist"];
And although the pathname exists. "myBundle" is always nil.
You just need to use anything that will let you at the CFBundleVersion of the currently installed plugin. Something like this works in a shell scripting environment:
/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' /Library/Internet\ Plug-Ins/Flash\ Player.plugin/Contents/Info.plist
There might be a way to search the system's list of installed applications for a bundle ID matching com.macromedia.Flash Player.plugin and pull out the bundle version from the system record, as well.
EDIT: It looks like both NSWorkspace and Launch Services just map items to bundle IDs of relevant apps, and then will map a bundle ID to a URL or FSRef. So ultimately, with this approach, you have to grab the appropriate bundle and pull out the version from there.
There's likely also a way to get this information from some JavaScript code running within the webview. Adobe's SWFObject seems to make this quite easy, for example. For more, see "Detecting Flash Player versions and embedding SWF files with SWFObject 2".
Just leave off the Contents/Info.plist part; you need to get the bundle, not its Info.plist:
NSBundle* flashBundle = [NSBundle bundleWithPath: #"/Library/Internet Plug-Ins/Flash Player.plugin"];
NSString flashVersion = flashBundle.infoDictionary[(id)kCFBundleVersionKey];
Remember to cover the case when there is no Flash Player installed.