hey
its me again
if (for example) you make an app. with a media player plugin in it and build the program eventually. Could you right-click a song, select "Open With" then choose the app. i built? is this possible with ams6?
hope that makes sense
Professional Software Development Tools
hey
its me again
if (for example) you make an app. with a media player plugin in it and build the program eventually. Could you right-click a song, select "Open With" then choose the app. i built? is this possible with ams6?
hope that makes sense
yes, but you will need to process the commandline within your app. Someone correct me if I'm wrong, but the OS will fire the associated application with the file as a command line parameter. AMS allows you to accept commandlines parameters, so this is definitely doable.
glad its doable.. but "how" is the problem!
if anybody can help me id greatly appreciate it..![]()
You didn't ask that...
Look in the help file for Commandline, you'll find info there for how to deal with them. If you have trouble after that, post some code, and someone here will more than likely help get you going in the right direction.
thnx for the tip but the AMS help file only shows you command line arguments and command line variables..
Last edited by Mina; 11-02-2005 at 02:21 AM.
maybe it has something to do with the Global functions?
Code:if _CommandLineArgs[1] ~= "" then --open the file sFileName = _CommandLineArgs[1]; --do whatever you need to here else --no file was passed to the app end
I see that Worm has posted, the story of my life, day late and a dollar short . . . is that violins that I hear. . . That reminds me of a funny story. My kids told our neighbors that they were not able to watch a certain movie because of the violins. Are we raising our kids to be prejudice against violins? NO, but we don't let them watch VIOLENT movies either.
Anywho, here was my stab at the code, I have also added the command line stuff to a project if you want to see how it works.
The above code was used for the IR Project CodeViewer.Code:if _CommandLineArgs[1] then if File.DoesExist(_CommandLineArgs[1]) then strInput = _CommandLineArgs[1]; else Dialog.Message("ERROR", "There was an error in loading the file."); strInput = Application.LoadValue("IR Product CodeViewer\\Settings", "LastFileViewed"); end else strInput = Application.LoadValue("IR Product CodeViewer\\Settings", "LastFileViewed"); end
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
appreciate ur help
thnx
to try it i used
result = Application.GetMenu();
Paragraph.SetText("Paragraph1", result);
but it gives an error: it must be a type of string
what should i do about that?
mina
Mina, you should really utilize the help guide. Would save you so much posting time, grief, waiting.
Just use the string variables below (sMessage) and apply it to your paragraph object -
Code:function OutputMenu (tMenuToOutput, nLevelCount, sMenuString) -- Since we don't want to make nLevelCount required (for the first call), -- we have to initialize it if it is not passed to the function if not nLevelCount then nLevelCount = 0; end -- sMenuString is not a required variable (for the first call), -- therefore we must initialize it if it was not passed to the function. if not sMenuString then sMenuString = ""; end -- Menu table is numerically indexed, step through for each node for nIndex, tMenuItem in tMenuToOutput do -- Add the current menu item to the string to return, whether it has a sub menu or not sMenuString = sMenuString .. String.Repeat(" ", nLevelCount*4) .. tMenuItem.Text .. " (ID: " .. tMenuItem.ID .. ")".. "\r\n"; -- Check if a sub menu exists at the current menu's location if type(tMenuItem.SubMenu) == 'table' and tMenuItem.ID == -1 then -- A sub menu exists. Recursively call this function to include the sub menu. -- Increasing the level count by 1 controls the indent that the item will have in the output. sMenuString = OutputMenu (tMenuItem.SubMenu, nLevelCount + 1, sMenuString); end end -- Return the menu string return sMenuString; end -- Get the menu structure and store in a table tMenu = Application.GetMenu(); -- Set the title and message for the Dialog.Message box sTitle = "Current Menu Structure"; sMessage = OutputMenu(tMenu); -- Display a Dialog.Message box to the user Dialog.Message(sTitle, sMessage);
Application.GetMenu returns a table, you need to use the table elemtents
result.ID --(number)
result.Text --(string)
result.Enabled --(boolean)
result.Checked --(boolean)
result.SubMenu --(table)
Originally Posted by Mina
I agree with Tigg, peaceful non-violins is the only way to go.![]()
That's the first time I've heard of anyone limiting their childrens' media intake toward that end though. Commendable stuff Tigg, that's some mighty fine parenting. You guys never fail to impress me. Your tykes have got it made in the shade with pink lemonade.![]()
feel so much like a beginner here..![]()
thnx for all the help
You'll be surprised how quickly you can get some decent traction with AMS. The basics are pretty straightforward and once you have those the rest is gravy.![]()