Scripting Page Changes


m4st3r

Recommended Posts

Hello all,

I am trying to write a sequence / script that will run automatically, and change from page to page every 30 seconds. Is there a command that will accomplish this?

I am very new to programming (though I have some experience with Qbasic... LOL), so please bear with me!

Thanks!

-Howard

Link to comment
Share on other sites

Sure. There are fancy ways to do it, but the easiest is this:


private interval = 30
while (1)
page.strCurrentPage = "myFirstPage"
delay(interval)
page.strCurrentPage = "myNextPage"
delay(interval)
// repeat for each page
endwhile
[/CODE]

The much cleaner, but slightly harder to understand version:

[CODE]
private interval = 30
private string pages = {"myFirstPage", "mySecondPage", "myThirdPage"}
while(1)
for (private i = 0, i < numrows(pages), i++)
page.strCurrentPage = pages[i]
delay(interval)
endfor
endwhile

[/CODE]

In this case, add your pages to the pages array.

In both cases, select "AutoStart for the sequence and set the priority to 0.

Link to comment
Share on other sites

Thank you! That works great!

I was on the right path, but couldn't figure out the correct command / syntax. I was actually pretty close, as I had tried "page.changepage" and several variations of that. Is there a library of functions and commands available that might help me with future problems like this? I've read that the programming language used in DAQfactory is similar to Visual Basic and C, but I'm not sure what to use as a reference.

Thanks again!

-Howard

Link to comment
Share on other sites

The user's guide is the only real reference. General global functions are described in chapters 4 and 5, while more specific functions, like page functions are described towards the end of the chapter on that item. So for example, the page functions are section 7.14 with chapter 7 being on pages.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.