2005-05-20 08:08 PM
2005-05-20 11:41 PM
2005-05-25 02:35 PM
2005-05-25 04:54 PM
2005-05-25 07:42 PM
2005-05-25 09:43 PM
parameters SidingIsLoaded=0 parameters LogIsLoaded=0 ParchToolsFolder = open( "FileMan", "ParchSidingFolder", "files, dialog" ) n = input( ParchToolsFolder, 0, 0, fileName ) while n = 1 do If fileName="parch sid_prof.gsm" Then parameters SidingIsLoaded=1 EndIf If fileName="parch tools log.gsm" Then parameters LogIsLoaded=1 EndIf n = input( ParchToolsFolder, 0, 0, fileName ) endwhile close( ParchToolsFolder )This is a little snippet from our Siding accessory that i made. the statements:
parameters SidingIsLoaded=0 parameters LogIsLoaded=0set the value of the profile loaded to fals so it can check if any change is made to location and/or ownership of profiles. while this might not help you too much it shows that you can pass variable values to the file scan to supply function arguments later on in the code, which is what happens with those variables. they end up controlling the functionality of the object and changing the menu structure.
ParchToolsFolder = open( "FileMan", "ParchSidingFolder", "files, dialog" )this sets a project variable that finds the system path and ties it to a certain location. This feature IS cross-platform. transfering the file from a win32 system to a Mac, will fail to find C:\Libraries\<path> and will end up asking for you to browse a new location.
n = input( ParchToolsFolder, 0, 0, fileName ) while n = 1 do If fileName="parch sid_prof.gsm" Then parameters SidingIsLoaded=1 EndIf If fileName="parch tools log.gsm" Then parameters LogIsLoaded=1 EndIf n = input( ParchToolsFolder, 0, 0, fileName ) endwhilethis will scan each file for its name and select report back a value. in this case it will find our profile files and mark them in the params by changing its value to true. you could use something that randomly generate a number or maybe if you are attempting to animate something, use a incremental value and have it load that image.
close( ParchToolsFolder )this closes the directory
2005-05-25 10:30 PM