Creating a preferences window

Hi
I wonder if there is any way to create in Director a
preferences window (see example below).
http://www.guide.lancs.ac.uk/tellguidemyname.html
In particular what i would like to do is to allow my users to
select the things they want to select from the preferences window
and then when press save to get the appropriate movie.
If the user selects the language of the system to be English
then play movie English otherwise
if the user selects the language of the system to be Greek
then play Greek movie
and
If the user selects architecture + maritime related
information to play movie A (that contains the relevant content)
otherwise if the user selects History and architecture then
play movie B (that contains the relevant content)
I would also like to record the preferences selected in some
kind of text file that would tell what the user selected. Is there
any way to do that?
All ideas will be appriciated
Many thanks

I don’t have a simple dir I can post but Buddy
API’s help file has some code snippets that make good
examples. If you have trouble getting started let me know. What I
can post are some examples of how to use my scripts to code the ini
data, keep in mind that you only need to code the data if you are
allowing the users to type text strings to be stored in the ini
file, if all of your data is generated by lingo you can make sure
the data is ini safe yourself without having to code it first.
First the scripts, copy and save in a movie script cast
member:
on codeIniData cMode, iniString
case cMode of
"read" :
iniString = replaceField(iniString,"¬","=")
iniString = replaceField(iniString,"¶",RETURN)
iniString = replaceField(iniString,"µ",";")
iniString = replaceField(iniString,"§","#")
iniString = replaceField(iniString,"«","[")
iniString = replaceField(iniString,"»","]")
"write" :
iniString = replaceField(iniString,"=","¬")
iniString = replaceField(iniString,RETURN,"¶")
iniString = replaceField(iniString,numToChar(10),"¶")
iniString = replaceField(iniString,";","µ")
iniString = replaceField(iniString,"#","§")
iniString = replaceField(iniString,"[","«")
iniString = replaceField(iniString,"]","»")
otherwise : alert "Unknown mode in codeIniData."
end case
return iniString
end
on replaceField input, stringToFind, stringToInsert
output = ""
findLen = stringToFind.length - 1
repeat while input contains stringToFind
currOffset = offset(stringToFind, input)
output = output & input.char [1..currOffset]
delete the last char of output
output = output & stringToInsert
delete input.char [1.. (currOffset + findLen)]
end repeat
set output = output & input
return output
end
OK, lets say you create the following ini file using notepad
and save it with the name “foodPrefs.ini” in the same
folder as your dir movie:
[breakfast]
sue=coffee
bill=bagel
tom=eggs
[lunch]
sue=Chicken McNuggets
bill=Quarter Pounder with cheese
tom=Fries
If you want to read Bill’s lunch preference into
Director simply use the following:
myIniPath = _movie.path & " foodPrefs.ini"
billsLunch =
codeIniData("read",baReadIni("lunch","bill","Error",myIniPath))
if billsLunch = "Error" then alert "Error reading settings
file."
If you have an editable text cast member with the name
"suesBreakfast" and ask sue to type her breakfast order, to save
that order do the following:
myIniPath = _movie.path & " foodPrefs.ini"
suesOrder = codeIniData("write",member("suesBreakfast").text)
resultCode =
baWriteIni("breakfast","sue",suesOrder,myIniPath)
if not resultCode then alert "Error writing settings file."
The most common reason for getting the alert when reading or
writing to the ini file is either an error in your path or having
the ini file open in notepad at the same time Buddy API is trying
to access it. For best results quit notepad before testing.
Storing the contents of an editable text cast member is an
example of why you want to code the ini data. It is possible,
although unlikely, that the user will type characters that have
special meaning in an ini file, I simply temporarily replace those
characters with others that are impossible to type (well, not
really impossible, but very unlikely).
If you are curious, numToChar(10) is the linefeed character
which I replace with a standard RETURN. The most likely reason to
encounter a LF is because the user copied and pasted the text from
another source. Director doesn’t display LF’s in
strings, so replacing it with a RETURN keeps the formatting looking
like the original.

Similar Messages

  • Blank white System Preferences window

    Hello all,
    I purchased a secondhand G5 for the purpose of having a second internet station at home (I do most of my work on a late 2008 MBP but we've got multiple people here who like to use the Internet at the same time). When I set up this computer, it was hooked up to an old flat screen monitor (bought when they first came out) the HD was wiped clean, Leopard was installed, the internet was set up and working and everything seemed good to go. However, I wanted to get into the system to change the monitor resolution setting since the type/icons were a little big for my taste.
    When I pulled up System Preferences, I got a completely blank white window. This happens every time System Prefs is launched. I can click on this window where normally icons would be, and things seem to happen (the window changes size) but it remains completely white. Moreover, all of the pulldown menus from the top menu bar also are blank white. I can move my mouse down in the File menu where Quit would normally be, and I can click on it and System Preferences quits. If I quit out of System Prefs, the Finder and other software windows act normally. When I log into System Prefs again, same blank white window, same problem.
    This blank white window thing also happens with Preview, but I have not noticed it with any other programs on the system (yet).
    Here's what I've done to troubleshoot:
    Discarded appropriate systempreferences.plist file in the User>Library>Preferences window, also appropriate file in User>Library>Caches. Emptied trash and rebooted. Same problem.
    Reinstalled Leopard, 10.5. Tested, same problem. Upgraded with combo pack to 10.5.8, tested, same problem.
    Swapped out video card for a known working video card, tested, same problem.
    Swapped monitor for known working new monitor, tested, same problem.
    Am I missing some other .plist or similar file that should be discarded? Has anyone experienced anything like this and been able to solve it? Would this be due to software issues, or some kind of hardware issue? Because I can't see System Preferences, I can't create a new user account and discard the old one to try and resolve any software issues, my only choice is to do a clean install (which I have done to no avail).
    Help? I'd appreciate any guidance. Thanks in advance.
    Raji

    Well, at least we are seeing some light here. I forgot about Safe Mode! When I started up into that, I can see the System Preferences windows just fine... it's no longer white, and I can select what I need and make changes.
    However, I have done permissions repair from every possible angle (both from HD and DVD), I have reset the PRAM, and I still get a blank Sys Prefs window on normal startup.
    The only thing suggested here I have not tried is replacing the PRAM battery (since at the moment, I don't have one). That will be the next angle of attack but I'll have to wait to get one in.
    Other than the battery, could this be some kind of peripheral or software conflict?
    This is bugging me! I mean really.... it's just an Internet station, but one does want things to work properly nonetheless!
    Thanks for the help so far.... ! It has been useful.

  • I upgraded to OS Yosemite on my MacBook Air...and I cannot upgrade the Adobe Flash download that Adobe keeps asking me to download. I get the screen and when I click on the icon it just creates a new window but not download. Thoughts?

    I upgraded to OS Yosemite on my MacBook Air...and I cannot upgrade the Adobe Flash download that Adobe keeps asking me to download. I get the screen and when I click on the icon it just creates a new window but not download. Thoughts?

    I just tried the link and it is just fine. If the GateKeeper pops up then open Security & Privacy preferences, click on the General tab, set the last radio button to Anywhere.

  • PS CC 2014 Actions launch Preferences Window

    I've been using Photoshop Actions for years but recently I've encountered some odd behavior. I made a simple action that removes transparency from a document by executing the Trim command. The last part of the action then saves the changes and closes the PSD file. It worked great until today.
    Here are the steps I'm performing:
    While I'm in Bridge, I select all my files in the current folder, I initiate this Action from Tools \ Photoshop \ Batch. This switches me over to PS with the Batch window open. From there, I can choose the action from the drop down list  and run it.
    The action runs its course on the selected files with no issues the first time around.
    However, if I try to run the action again on files in a different folder (from Bridge), I keep getting the Preferences Units & Rulers window launches each time the file loads. I have to sit there and press the Escape key each time in order for the action to complete.
    I tried to duplicate the behavior by stepping through the Action manually in order to pinpoint which step is the culprit, but the Preferences window doesn't load. It only does it when the Action runs on its own.
    Anyone know why this would happen?

    If you create an action set with just the one action and save the set upload the uploade it to the web and post a link to the .atn file we can download the action and test that on our machines.  You will get feedback from both Mac and PC users. It sound odd that it would work once then fail the second  time. Was Photoshop CC 2014 up before you used bridge menu tools>photoshop>batch the first time or was Photoshop started because you used tools>photoshop>batch.  If is was not up did you try closing PS down before the second batch?

  • How do i add and delete photos from the screensaver preference window

    How do i add and delete photos from the screensaver preference window?

    Hello, sassy4sue. 
    Thank you for visiting Apple Support Communities. 
    Here is an article that you may find helpful when creating or editing iPhoto albums that you are using as a screen saver. 
    Mac Basics: Using Screen Saver when your screen is idle
    http://support.apple.com/kb/ht2485
    Cheers,
    Jason H. 

  • ITunes preferences window completely blank

    Hi everyone,
    I haven't been using iTunes on my PC (Windows 7 x64, ATI Radeon 5770 X2 CF) for a while (I've been pretty much exclusively using it on my Macbook Pro over the past year) and so I have only opened it rather sporadically, just keeping it updated and occasionally playing a few songs. Having decided to switch back to Windows now, however, I decided to check the library settings so I could see how iTunes would handle importing my library files copied from my MBP. Instead, however, I was confronted with a completely blank window with just a "?" button, "OK" button and "Cancel" button. Clicking the "?" freezes and crashes the application while OK and Cancel simply close the window.
    Here is a picture of it for reference (hopefully these forums allow hotlinking): http://i.imgur.com/1DnpZ.png
    Now, I've tried a fair few things before coming here in hopes of solving the problem, even though there hasn't been a lot of relevant results when searching for this problem via Google. I've tried completely removing iTunes (following Apple's procedures for complete removal including checking the 64-bit Windows locations), I've tried checking my font files, and I've checked dxdiag. All of my drivers are up to date, and I haven't been experiencing problems in other applications (well, funnily enough, the Preferences option in Evernote refuses to open any window at all, although I doubt there's a link).
    As you can see, what started off as wanting to play some music on the loudspeakers while I do a cleanup of the house has turned into a bit of a good old troubleshooting session lasting several hours. After trying the most common solutions, I'm out of ideas. Can anyone here think of anything that might help, or has anyone faced and overcome the same problem in the past?
    Chris
    Edit: Oh, and I just tried creating a new Windows user account to ensure that it wasn't a problem local to this account only, and it has the same issue.
    Message was edited by: ChrisPWill

    I'm guessing it's something to do with the registry, although I haven't done anything strange since the last time I formatted my computer. It reeks of bad coding for the software to be having problems like this on an untouched windows installation. Obviously this is a rare issue seeing as I've only found a few examples of similar issues. If anyone can think of anything I should try, short of reinstalling Windows, please do let me know.

  • Java preferences window doesn't show the tabs after jdk 7 update 7 installations

    java preferences window doen't show the tabs after jdk 7 update 7 installations, before the installations of jdk 7 u7 the tabs in the java preferences window were visible

    Then, dump Chrome or uninstall Java 7u7 and connect back tol Java SE 6:
    Q: Can I restore Apple Java 6 after uninstalling Oracle Java 7?
    A: Go back to Apple Java 6 using the following instructions:
    Uninstall Oracle Java 7 by deleting the plug-in file. From a Terminal window enter:
    sudo rm -rf /Library/Internet Plug-Ins/JavaAppletPlugin.plugin
    Create a symlink using the following command, entered on a single line:
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

  • My firefox won't create a new tab when I click on the tab. It will create a new window. It worked fine till this morning. I've rebooted several time to see if that would make a difference. It doesn't.

    I can only create tabs by clicking on a link in an email or a program or a link in the window I am viewing. It will NOT create a new tab when I click on the tab to create a new tab, nor will it create a new tab when I right click on the tab & click on create a new tab. I'm used to using tabbed browsing all the time & it's driving me nuts. HELP!
    I have not downloaded any new updates on any software or downloaded any new software in the hours before this started happening.
    Just to clarify about my original question. I meant to say that firefox will create a new window when I right click & click on create a new window but will not create a new tab when I click on create a new tab. I think what I wrote may have been somewhat confusing.

    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Open Link in New Window creates an invisible window (visible after restarting).

    When I use the right mouse button menu to Open Link in New Window from a web page it creates an invisible window. That is, I cannot see the window but it is listed in the Firefox Window menu. This newly opened window cannot be selected either by mouse or from the Window menu. However, if I quit and restart Firefox the new window appears as 0 pixels wide (i.e., a 1 pixel wide vertical line) and I can select it (by mouse or Window menu) and zoom it from the Window menu. After zooming I can operate on the window normally.

    Get Firebug and inspect the element. You'll see that it actually is this:
    onclick="javascript:saw.runThis
    URL('saw.dll?PortalProperties&_scid=To2OnvCVXpY&PortalPath=/shared/paint/_portal/PoC\x2520FINS&Done=ManagePortals\x2526Done\x253dAdmin');return false" href="javascript:void(null)" FF doesn't even give you the "Open..." options and all IE versions as of 7 show them but actually don't do anything when you invoke them.
    Edited by: Christian Berg on Sep 9, 2009 10:36 AM

  • When i create a new window, firefox Yanks me back to where i was and i dont want to be yanked back.

    i duplicate current pages by create new windows on a very frequent basis;
    to do this, i go to the top of the page that i want to duplicate and right-click and click on Open Link in New Window;
    I specifically want to duplicate the page i am on in another Window, not a new tab;
    Because
    Duplicating the current page to Open Link in New Tab, gives tabs on the top of my screen;
    Duplicating the current page to Open Link in New Window, gives 'tabs' on the bottom of my screen;
    I want 'tabs' to show on the bottom of my screen and to do that i have to Open Link in New Window;
    My question and What is happening, is that firefox is yanking me back to the page that i have just duplicated by right-clicking at the top of the page and clicking on Open Link in New Window;
    When i create the new Window, firefox yanks me back to the page that i just duplicated and i dont want to be yanked back to that page;
    I want to stay on the page that i just duplicated.
    I have tried changing the way tabs work in Options but nothing checked or unchecked results in the specific way i want to have new Windows open and STAY on that newly created Window and not be YANKED back to the window i duplicated.

    The original window did not have a Flash object, but does the window that hides itself contain a Flash object? That is the usual pattern for this bug in the plugin's protected mode feature.
    If you have not already tried disabling it, the following pages/posts provide different ways to do that:
    * Adobe support article under the heading "Last Resort": [http://forums.adobe.com/message/4468493#TemporaryWorkaround Adobe Forums: How do I troubleshoot Flash Player's protected mode for Firefox?]
    * Manual steps: https://support.mozilla.org/questions/968190?page=5#answer-509209
    * Batch file to automate the manual steps: https://support.mozilla.org/questions/982093#answer-518078
    Flash needs to completely unload from memory (restarting Firefox might help) before this would take effect.
    More history: [https://support.mozilla.org/questions/955659 Opening New Windows and Shockwave Flash]

  • How to create pop-up window to search for items

    Hi,
    I want to create a pop-up window were the user will be able to search for an item and select it.
    How can I use a pop-up window in a portlet? Is there any api in the pdk for creating pop-up windows?
    Thanks

    Hi,
    Can you let me know why you are trying to use a popup window for searching?
    You can always add a search portlet - Basic,Advanced,Custom
    - which will give you the link to the respective searched items.
    I couldn't get a clear idea of your requirement.
    Thanks.

  • How do you create multiple execution windows for a custom opterator interface

    I am starting to create a custom operator interface for TestStand 3.5 using Labview 8.0.  This is my first exposure to custom operator interfaces (and ActiveX).  The example operator interfaces have only one execution window that changes based on the executions combo box.  My sequence is going to be run with the parallel sequence model (2 test sockets).  So I want my custom operator interface to have 2 execution windows, one for each test socket.  How can I do this?  I created a second execution window but it just mirrors the first execution window. 

    Hi, All:
     With the similar approach, I create a multiple window user interface with CVI. Although it can run, the Execution view doesn't display
    anything while execution. In my user interface, there is an applicaiton manager resident in Parent form, and every child forms has
    itsown Exection view and Manager.
     Referred to the C# sample, in the function rivate void DisplayExecution(Execution execution)
       if (executionForm == null) // execution is not in a form, make a new form
        executionForm = new ExecutionForm(this, this.axApplicationMgr, execution);
        this.mChildFormsKeyedByViewMgr.Add(executionForm.GetViewMgr().GetOcx(), executionForm);
        SetNewChildFormLocation(executionForm);
     I guess the execution form "hook" the exectuion view manager via Add(), so the exectuion view can be updated properly.
    And according to reference manual of teststand, it mentions that "The application sets the ExecutionViewMgr.UserData property to
    attach a handle, reference, or pointer that represents the window." But when I try to utilize this method, I got 2 problems:
    1. How to get a window handle of a CVI panel? As execution view are resident in child panels, so I may need the window handle of
     individual child panels.
    2. Even the window hanlde is gotten, how can I convert it to a VARIANT Type? According to the function panle of
    TSUI_ExecutionViewMgrSetUserData (, NULL, ), the last parameter is a "VARIANT".
    Any comments or instructions for my assumption?
    Thank you for your help.

  • Can i create a home window without using a NIB file

    I hate interface builder, it is a really counter-intuitive piece of junk. Please don't try to convince me otherwise I prefer to do it all in code. Right now i have my whole product running dynamically, creating all the interface objects programmatically as my positioning is all calculated on the fly.
    However I still have one NIB file (MainWindow.NIB) that creates the home window and somehow links to my AppDelegate class, which is the startup class for my app. I see that my main.c routine calls UIApplicationMain() which somehow loads the main nib (hidden magic here), and then eventually my AppDelegate() method which is of calss UIWindow() gets called with an initialize() call followed by applicationDidFinishLaunching() call and off we go.
    Can I create the window dynamically by not using NIBs? Now that we have ipad and iphone to contend with, I would want to create a window that is either 320 x 480 or 768 x 1024 depending on what machine I am on. I would like to get rid of the NIB because I don't understand the wiring stuff and I tried to make a NIB myself but now get a cryptic error message, and anyway the NIB has a fixed size and my app wants to be dynamic now that we have two screen sizes.
    The second part of the question is how do you know what kind of machine you are on? I don't see a Gestalt() routine like in the old mac days so you can tell what machine it is.

    There are always less-informed people who think that a STATIC development tool is somehow more powerful than a flexible dynamic interface computed as one goes. The idea of a static screen form that you control dates back the 80's; modern interfaces are DYNAMIC and interface builder cannot construct those; sure it can perhaps help you lay out things, but if the user turns on certain features then new controls are visible. We have built products with over 500 controls in them and as only perhaps 25 are needed at any one time the software rearranges the screen in the most optimal form at all times. The more advanced the product the more one chafes at a static design tool.

  • When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    When creating a new window in safari, using command T, the marker have not activated the search field. It means you have to click there every time. Changed after upgrading to Mavericks. Anyone knows how to change this?

    Yes, you can do something like that. What you would do is create a button for each image and then hide them. When I do this type of thing I place all of the buttons on a template page and then hide the template.
    You can then use JavaScript to copy the icon from any of the hidden buttons to the main button that you've set up to display the image. For example, suppose you set up 10 buttons named b1, b2, b3, ...b10. The code to copy the icon from one of them to the button used to display the image (b0) would be something like this:
    // Get the icon from the b3 button
    var oIcon = getField("b3").buttonGetIcon();
    // Get  reference to the b0 button
    var f = getField("b0");
    // Set the icon of the b0 button to the icon retrieved from the hidden button
    f.buttonSetIcon(oIcon);
    // Show the b0 button
    f.display = display.visible;
    This code would go in the Mouse Up event of the smaller button.

  • Problem in creating a model window

    Hi,
    I am trying to open a window on the click of the button and I am getting the following error
    Parameter windowInfo must not be null.
    this is the code i wrote to open the window
    IWDWindow excelLinkWindow;
    try{
                   wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("excel"+wdComponentAPI.getComponentInfo());
                excelLinkWindow =
                wdComponentAPI.getWindowManager().createModalWindow(
                wdComponentAPI.getComponentInfo().findInWindows("Popup"));
                excelLinkWindow.setWindowPosition(WDWindowPos.CENTER);
                excelLinkWindow.setWindowSize(500, 1500);
                excelLinkWindow.open();
              }catch(Exception e ){
                   wdThis.wdGetAPI().getComponent().getMessageManager().reportException("error"+e.getMessage(),false);
    Please let me know the solution

    HI
    1.Create another new window named "Popup". Embed dynpro view in data navigator of this window (if view is in same component) else use "Embed interface view for a component instance",if view is from another component.
    2. create a WinInstance Node of cardinality 1:1 and node element of java native type IWDWindow. in both primary and popup views.
    3. Create mapping.
    4. Create an action In caller view and write this piece of code in it.
    IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("Popup");
         IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
         window.setTitle(" Purchase Order Unit");
         window.setWindowPosition(WDWindowPos.CENTER);
         *wdContext.currentWindowInstanceElement().setWinInstance(window);* // To handle called popup window
         window.show();
    5. create a closeWindow Action in popup window and write this line to destroy window Instance.
    wdContext.currentWinInstanceElement().getWinInstance().destroyInstance();
    6. Right click on window name and choose properties then from properties copy window name and paste in your code i.e findInWindows("Popup"); This is just to ensure that there will be no typing error.
    Thanks,
    Mandeep Virk

Maybe you are looking for