Blog posts

Bio

By Clint Brown

In this blog post, I would like to explore the often overlooked iLogic Snippet.

Essentially a Snippet is a saved bit of Code that you can easily re-use later.

There are 2 types, System and Custom. The Custom Snippets allow you to add your own bits of code. You will notice that if you click on, or hover over a specific snippet, you are presented with a preview of the code.

Double clicking on the code, will insert it into the rule.

To create your own snippet, highlight all of the Code you wish to save, then Right Click on it and Select Capture Snippet.

 

Give the New Snippet a name, and click on Use Code as Tooltip (this is the preview)

Your Code will now appear in your Snippets.

 

Here is a quick video showing the workflow... Note the Robot Voice, see the Code at the end for more info.

The iLogic code in the video, uses 2 Windows tools, the first to read a text file, and the second is the Windows Voice command. If you create a text file called TTS.txt and save it to your root C:/ directory, the code will read you whatever you paste into the file. Enjoy!

 

'____START OF CODE_______________________

 

'___Use windows voice command____________

Dim objSPVoice,colVoices

objSPVoice = CreateObject("SAPI.SpVoice")

objSPVoice.Speak ("iLogic Rocks")

'____END OF CODE__________________________

 

In the images above, the code I use looks at a Cell in an Excel File called TTS.xlsx, also in the root directory, here is the code to reference the Excel file:

 

'____START OF CODE_______________________
Dim TTS as String = GoExcel.CellValue("C:/TTS.xlsx", "Sheet1", "A1") '___Use windows voice command____________ Dim objSPVoice,colVoices objSPVoice = CreateObject("SAPI.SpVoice") objSPVoice.Speak (TTS)
'____END OF CODE__________________________