Presentation is loading. Please wait.

Presentation is loading. Please wait.

2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name.

Similar presentations


Presentation on theme: "2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name."— Presentation transcript:

1 2. Recording a Macro

2 Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name not previously used within that script You can assign a shortcut key to launch the macro

3 Macro Recording As soon as you have selected OK on the previous dialog box, you are recording Everything you do will be recorded as a line of code At the bottom right of your screen is Stop Macro Command Dialog. When you have completed your macro select ‘Stop Recording’

4 Example 1.Open the image Spots.tif from the example images 2.Select to record a macro called Count 3.Select the count/size dialog box from the Measure file menu 4.Set a threshold 5.Count 6.Select to view the measurement data 7.Stop Recording

5 Example Sub Count() ret = IpBlbShow(1) ret = IpBlbSetAttr(BLOB_AUTORANGE, 1) ret = IpBlbSetAttr(BLOB_BRIGHTOBJ, 0) ret = IpBlbCount() ret = IpBlbUpdate(0) ret = IpBlbShowData(1) End Sub

6 Macro Recording Your macro is now complete and will exist as an item in the Macro file menu It will also appear as an item in the Macro dialog box – see opposite It can be executed by selecting at either of these points or by any shortcut key assigned

7 Assigning a button to your macro From the Edit file menu select Preferences From the Preferences dialog box select the Toolbar Tab Select Add and you will be prompted to browse to your script file and from that select the macro Then select Apply and the number 1 will appear as the last item on your tool bar.


Download ppt "2. Recording a Macro. Macro Recording Select Record Macro from the Macro file menu and the dialog box opposite will appear Your macro will require a name."

Similar presentations


Ads by Google