Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blocks:app-note:controlling-a-pc [2019-12-17 22:04]
admin created
blocks:app-note:controlling-a-pc [2023-12-15 09:27] (current)
mattias [Turning Power On/Off]
Line 15: Line 15:
 You need two computers and a network to use this application note. You need two computers and a network to use this application note.
  
-  * The Blocks server computer – a Mac, Windows or Linux computer that has Blocks 3.3 or later installed.+  * The Blocks server computer – a Mac, Windows or Linux computer that has Blocks 4  installed.
   * The target computer, running Windows. Powerpoint is needed to use those parts of this application, but not for basic functionality.   * The target computer, running Windows. Powerpoint is needed to use those parts of this application, but not for basic functionality.
  
Line 21: Line 21:
  
   - [[https://adoptopenjdk.net|Download]] and install Java (version 1.8 or later required).   - [[https://adoptopenjdk.net|Download]] and install Java (version 1.8 or later required).
-  - Download {{:blocks:app-note:controlling-a-pc:pc-control.zip|this ZIP}} file and unpack it.+  - We have prepared a PIXILAB-blocks-root folder containing everything you need to run the examples. {{:blocks:app-note:controlling-a-pc:pc-control.zip|Download this ZIP file and unpack it.}} If you don't know how to do this, read the instructions in the [[blocks:app-note:start|general setup section]].
   - Inside the UIROBOT folder, launch the file named "uirobot.bat" by double-clicking it.   - Inside the UIROBOT folder, launch the file named "uirobot.bat" by double-clicking it.
  
 A command window will appear, with some text indicating that the UIROBOT program has started. You may also get a firewall alert, prompting you to allow this Java program to access the network. A command window will appear, with some text indicating that the UIROBOT program has started. You may also get a firewall alert, prompting you to allow this Java program to access the network.
  
-Then follow these steps to run this example on your Blocks computer.+If you have done the general setup, copied the files and pointed to this application notes root block, follow the next steps to run this application on your computer.
  
-  - Copy the Blocks root folder included in the ZIP file downloaded above to your Blocks computer's home directory. 
-  - Alternatively, use a PIXILAB-Blocks-config.yml file in your home directory to point at this root folder, as described [[blocks:server_configuration_file|here]]). 
   - Start Blocks.   - Start Blocks.
   - Open the editor using the Admin button.   - Open the editor using the Admin button.
-  - Log in using the name //admin// and the password //pixi//.+  - Log in using the appropriate credentials (default is name //admin// and the password //pixi//).
   - On the Manage page in Blocks, select "TCP/UDP Devices".   - On the Manage page in Blocks, select "TCP/UDP Devices".
   - Select the "ControlledPC" device in the list.   - Select the "ControlledPC" device in the list.
Line 57: Line 55:
 The top level program folder name varies with the version of operating system and program installed. If you have a shortcut to Chrome on your desktop, you can right-click that and choose //Properties// to see the correct path to the Chrome application. The top level program folder name varies with the version of operating system and program installed. If you have a shortcut to Chrome on your desktop, you can right-click that and choose //Properties// to see the correct path to the Chrome application.
  
-Finally, adjust the IP address shown at the end o the //programArgs// variable to match the IP address of your Blocks server, as well as the port number (using the port number shown in the Blocks editor URL bar). The programArgs variable specifies the arguments passed to Chrome, which in this case will launch it in full screen mode, acting as a Display Spot for Blocks. Run the Start task now to launch Chrome in this way. The first time you launch Chrome you likely need to add or assign it to a display spot:+Finally, adjust the IP address shown at the end o the //programArgs// variable to match the IP address of your Blocks server, as well as the port number (using the port number shown in the Blocks editor URL bar).  
 + 
 +{{:blocks:app-note:controlling-a-pc:uirobotchrometask.png?nolink|}} 
 + 
 +The programArgs variable specifies the arguments passed to Chrome, which in this case will launch it in full screen mode, acting as a Display Spot for Blocks. Run the Start task now to launch Chrome in this way. The first time you launch Chrome you likely need to add or assign it to a display spot:
  
   - Switch to the Display page of Blocks.   - Switch to the Display page of Blocks.
Line 102: Line 104:
  
 ==== Turning Power On/Off ==== ==== Turning Power On/Off ====
 +
 +:!: Please note that later versions of UIrobot driver has a built in power property that handles power on/off. so the method used in this application note is somewhat outdated.
  
 To power down the target computer, select the //System// task group then run the //ShutDown// task. This launches the //shutdown.exe// Windows program, which shuts down the computer. To power down the target computer, select the //System// task group then run the //ShutDown// task. This launches the //shutdown.exe// Windows program, which shuts down the computer.