4Misc_Starth4Platformh¿@9èVersionCheckè ¬xHHô@îÿîÿRg(üšHHdh� ¬xHHô@îÿîÿRg(üšHHdh� ¬x HHô@îÿîÿRg(üšHHdh� ^Graph*ÐEWDashSettings#úÿ  !¶‚ Ow\6Normalÿÿÿÿ@ ÿMonacoÿÿÿÿÿÿ<ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿHHHH$$4 4 4 4 4 4 qhome=9dÿÿÿÿJJW MBP:Users:jjw:Desktop:JJW MBPBDÿÿÿÿDesktopÿÿÿÿ cujjw/:Users:jjw:Desktop/DesktopJJW MBPUsers/jjw/Desktop/ ÿÿGRecentWindowsIgor Reference.ihf 4Misc_EndhTXOPState_Start hPeakFunctions2-64s;4XOPState_Endh\!„4*�// Platform=Macintosh, IGORVersion=8.040, architecture=Intel, systemTextEncoding="MacRoman", historyTextEncoding="UTF-8", procwinTextEncoding="UTF-8", recreationTextEncoding="UTF-8", build=34722 #pragma TextEncoding = "UTF-8" Silent 101 // use | as bitwise or -- not comment. DefaultFont "Helvetica" MoveWindow/C 25,654,724,797 MoveWindow/P 279,79,860,631 KillStrings/Z root:gWMSetNextTextFilesTextEncoding #pragma TextEncoding = "UTF-8" #pragma rtGlobals=3 // Use modern global access method and strict wave access. StrConstant k_folder = "root:mwefolder" Function MWE() string theImages = "red;green;blue;gray;source;other;" string theImage variable ic SetDataFolder root: // make images NewDataFolder/O/S $k_folder for (ic=0;ic<6;ic+=1) theImage = "img_" + StringFromLIst(ic,theImages) make/N=(10,10)/O $theImage wave theOne = $theImage theOne = sin(x + ic) * cos(y + ic) endfor SetDataFolder root: // create the graph and panel for the first time MakeWindowAndPanel() return 0 End Function/S f_theImageList(theFolder) string theFolder DFREF cdf = GetDataFolderDFR() string theImages SetDataFolder $theFolder theImages = WaveList("*",";","DIMS:2") SetDataFolder cdf return theImages end Function MakeWindowAndPanel() string theImages = f_theImageList(k_folder) string theFirstOne = StringFromList(0,theImages) DFREF mwef=$k_folder wave/SDFR=mwef firstImage = $theFirstOne NewImage/N=myImages firstImage SetWindow myImages userData(cImage)="0" NewPanel/N=myPanel/K=1/W=(0,0,100,100)/HOST=myImages/EXT=0 Button Complete,pos={10,40},size={80,20},title="Complete",proc=ButtonProc return 0 End Function MovetoNext() string theImageList = f_theImageList(k_folder) string theCImage, ItDstr variable ni = ItemsInLIst(theImageList) variable ci = str2num(GetUserData("myImages","","cImage")) DFREF mwef=$k_folder theCImage = RemoveEnding(ImageNameList("myImages","")) if (ci == (ni-1)) ci = 0 else ci += 1 endif ItDstr = StringFromList(ci,theImageList) wave/SDFR=mwef rimg = $ItDstr ReplaceWave/W=myImages image=$theCImage rimg SetWindow myImages userData(cImage)=num2str(ci) return 0 end Function ButtonProc(ba) : ButtonControl STRUCT WMButtonAction &ba switch( ba.eventCode ) case 2: // mouse up // click code here strswitch(ba.ctrlName) case "Complete": MovetoNext() break endswitch break case -1: // control being killed break endswitch return 0 End