Techbot
Pro
Posts: 43
Joined: Sun Aug 24, 2014 4:15 am

Opening programs and urls?

Sun Mar 01, 2015 8:43 am

I'm hoping to make this little helper handle programs, websites and such. I noticed this code in the Wiki, but I don't see how to actually have it open the program requested. How would I code that?

SIML Code

<Model>
      <Pattern>OPEN A NEW TEXT FILE</Pattern>
      <Response>
        <Label>Note-Word</Label>In Notepad or Wordpad?</Response>
    </Model>

    <Model>
      <Pattern>NOTEPAD</Pattern>
      <Previous>Note-Word</Previous>
      <Response>Opening Notepad...</Response>
    </Model>

    <Model>
      <Pattern>WORDPAD</Pattern>
      <Previous>Note-Word</Previous>
      <Response>Opening Wordpad...</Response>
    </Model>

User avatar
Leslie
Lead Software Architect
Posts: 353
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: Opening programs and urls?

Sun Mar 01, 2015 9:31 am

Actually that's just an example code to help developers understand the behavior of the Label tag.

The actual code would look something like the following:

SIML Code

<Model>
      <Pattern>OPEN A NEW TEXT FILE</Pattern>
      <Response>
        <Label>Note-Word</Label>In Notepad or Wordpad?</Response>
    </Model>

    <Model>
      <Pattern>NOTEPAD</Pattern>
      <Previous>Note-Word</Previous>
      <Response>Opening Notepad...<File Role="Open">Notepad.exe</File></Response>
    </Model>

    <Model>
      <Pattern>WORDPAD</Pattern>
      <Previous>Note-Word</Previous>
      <Response>Opening Wordpad... <File Role="Open">Wordpad.exe</File></Response>
    </Model>
Please note: The File element in the above code is just to demonstrate how a developer would implement and use custom tags.

We already are using a lot of custom tags with the upcoming Prototype 9+ but we haven't released the names of these tags yet so at the moment I'll encourage you work with SIML projects that deal with knowledge expansion instead of functional commands.

Techbot
Pro
Posts: 43
Joined: Sun Aug 24, 2014 4:15 am

Re: Opening programs and urls?

Sun Mar 01, 2015 8:08 pm

Sounds great :) Thanks for the tip!

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests