Home Notices Documents Classes Download Others Rice
Documents  >  usage  >  systemcgx
system.cgx

Script file executed by CookerGX

The sysytem.cgx is a script file execute by CookerGX. It is executed at the start, end, and others of the application.

The sysytem.cgx is optional. If there is no sysytem.cgx, nothing happens. If you need the system.cgx, it must be in the same directory as CookerGX.exe.

The sysytem.cgx is a script file for CookerGX too. Therefore, it must follow the specifications of CookerGX's script file.

Please refer to Source file section for the specifications necessary for CookerGX's script file.

Default system.cgx

The default 'system.cgx' is shown below.

1:

class main

2:

window _w;

3:

browser _br;

4:

message _m;

5:

open method void start()

6:

_br.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0";

7:

endmethod

8:
9:

open method void end()

10:

endmethod

11:
12:

open method void F1()

13:

_br.Navigate("https://www.google.co.jp/");

14:

endmethod

15:
16:

open method void F2()

17:

_br.Navigate("about:config");

18:

endmethod

19:
20:

open method void F3()

21:

endmethod

22:
23:

open method void F4()

24:

endmethod

25:
26:

open method void F5()

27:

endmethod

28:
29:

open method void F6()

30:

endmethod

31:
32:

open method void F7()

33:

endmethod

34:
35:

open method void F8()

36:

endmethod

37:
38:

open method void F9()

39:

endmethod

40:
41:

open method void F10()

42:

endmethod

43:
44:

open method void F11()

45:

endmethod

46:
47:

open method void F12()

48:

endmethod

49:
50:

endclass

open method void start()

This method will be executed at the start of the application. In the above case, the user agent has been set.

The start() method is mandatory.

open method void end()

This method will be executed at the end of the application. In the above case, Nothing will be executed.

The end() method is optional. If you do not need it, you do not have to define it.

Methods for programmable keyboard shortcuts

Methods with names beginning with 'F' are for programmable keyboard shortcuts.

For details of programmable keyboard shortcuts, please see the section of Keyboard shortcuts.

Next
Previous
Copyright © CookerGX All rights reserved.