, I've noticed that every time I open a Blockly script in ARC, I have to manually perform the same keyboard actions to resize and reorient the script. Given ARC's advanced capabilities, is it possible to automate these initial adjustments through a script? This would help reduce the repetitive steps needed to get started with each script. If this feature isn't currently available, could it be considered for a future update of ARC?
For example, I have a Blockly script that spans 1.5 pages. Each time I open it, I need to press the minus key five times to zoom out and then use the down arrow key to scroll up half a page. It would be incredibly useful to have these actions automated upon loading the script, with the flexibility to adjust as needed.
Automating keyboard actions like resizing and reorienting a Blockly script upon startup isn't directly supported in ARC. However, you can achieve similar functionality by using JavaScript or Python scripting to control the environment and automate certain tasks.
Here's a general approach you can take:
Use JavaScript or Python for Automation: You can write a script in JavaScript or Python to perform actions that are possible within the ARC environment. While direct keyboard emulation isn't supported, you can automate other tasks that ARC allows through scripting.
ControlCommand(): Use the
ControlCommand()
function to interact with other robot skills or controls. This can help automate certain actions within ARC.Custom Initialization Script: Create a custom initialization script that sets up your environment as needed. This script can be executed at the start of your project to configure settings or perform actions that are scriptable.
Feature Request: If the specific feature you need isn't available, consider submitting a feature request to Synthiam. They are always looking to improve ARC and might consider adding such functionality in future updates.
Here's an example of how you might use JavaScript or Python to automate some tasks:
While this script doesn't directly resize or reorient the Blockly interface, it demonstrates how you can use scripting to automate other tasks within ARC. If you have specific actions in mind that are scriptable, feel free to ask for more detailed guidance!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena Ok I understand and this would be a good work around. At the current time I am not familiar with keyboard strokes done by the computer. Could you expand on how all the different keyboard strokes can be done automatically. Since I learn best by examples give me a few working examples that I can download and diagnose to see how it is all done.
Automating keyboard strokes directly within ARC using JavaScript or Python isn't supported, as ARC focuses on robot control and interaction rather than emulating keyboard inputs. However, I can guide you on how to automate tasks within ARC using scripting, which can help you achieve similar outcomes by controlling robot skills and settings programmatically.
Example 1: Automating servo Movement
Here's a simple example of how you can automate servo movement using JavaScript or Python in ARC:
Example 2: Automating Audio Playback
You can automate audio playback using the Audio functions:
Example 3: Automating Movement Commands
Automate movement commands using the Movement functions:
Example 4: Using ControlCommand to Interact with Other Skills
You can use
ControlCommand()
to interact with other robot skills:Learning by Examples
To learn by examples, you can explore the following resources:
Synthiam's Example Projects: Check out the example projects available on the Synthiam website. These projects often include scripts that demonstrate various functionalities.
Synthiam Tutorials: The tutorials on Synthiam's website provide step-by-step guides on using different features of ARC, including scripting.
Community Projects: Explore projects shared by the Synthiam community. These projects can provide insights into how others are using ARC and scripting to automate tasks.
While direct keyboard emulation isn't possible within ARC, these examples show how you can automate tasks related to robot control and interaction. If you have specific tasks in mind, feel free to ask for more detailed guidance!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena Well that was a very off key reply. I already know how to do the above examples. We have been talking about keyboard key stokes. Example- on startup of script push - (minimize) 5 times. After that move page up a half of a page. I need examples of individual key strokes as if I were doing it singurlyy
I apologize for the confusion. Automating keyboard keystrokes directly within ARC using JavaScript or Python is not supported, as ARC is designed for robot control and interaction rather than emulating keyboard inputs. However, if you're looking to automate keystrokes for other applications or within a Windows environment, you would typically use external tools or programming languages that support keyboard automation, such as AutoHotkey or Python with libraries like
pyautogui
.Example with AutoHotkey
AutoHotkey is a powerful scripting language for Windows that can automate keystrokes and mouse clicks. Here's an example script that minimizes a window and scrolls down:
Example with Python and PyAutoGUI
If you prefer using Python, you can use the
pyautogui
library to simulate keystrokes:How to Use These Scripts
AutoHotkey:
.ahk
file and run it.Python with PyAutoGUI:
pyautogui
using pip:pip install pyautogui
.These examples demonstrate how to automate keystrokes outside of ARC. If you need to perform similar actions within ARC, you would typically look for ARC-specific scripting solutions or request feature enhancements from Synthiam. If you have further questions or need more examples, feel free to ask!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Athena Yes this past reply was much better and on point. Now I may need help from @Synthiam Support to bridge the two/three types of languages. ARC does do Python so that is one part, but most of my programming is done with Blockly or javascript. My thoughts are to have a separate script written in Python to open (controlCommand) up a script written in Blockly and manipulate it to proper sizes and then the Python script will be completed and Blockly script will be open. What is the proper way to do it?
To achieve the integration of different scripting languages within ARC, you can use the
ControlCommand()
function to manage the interaction between scripts. Here's a step-by-step guide on how you can set this up:Step 1: Create a Python Script for Automation
First, create a Python script in ARC that will handle the automation tasks, such as resizing or reorienting the Blockly script.
Step 2: Use ControlCommand to Open Blockly Script
You can use the
ControlCommand()
function to open or interact with the Blockly script from your Python script. Ensure that your Blockly script is set up to respond to specific commands.Step 3: Integrate with JavaScript or Blockly
If you have existing JavaScript or Blockly scripts, you can use the
ControlCommand()
function to trigger actions or pass data between scripts. Here's an example of how you might set this up in JavaScript:Step 4: Coordinate the Scripts
Ensure that your scripts are coordinated to execute in the correct order. You might need to use global variables or status flags to manage the flow between scripts.
Additional Tips
By using
ControlCommand()
and coordinating your scripts, you can create a seamless workflow that integrates Python, JavaScript, and Blockly within ARC. If you encounter any specific issues or need further assistance, feel free to ask!I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
A number of years ago I had to do something like you're wanting to do in my robot project. I ended up using a skill that would move the mouse pointer around and do the clicks needed to make things happen. I think it was called Remote Mouse. I stopped using it after a while as I didn't need it anymore but it worked great for what I needed it to do. Maybe it would help you with what you would like to do? If not at least there is funny video there with @DJ moving the PC mouse with his nose and the camera. LOL.
Here is it:
Remote Mouse https://synthiam.com/Support/Skills/Misc/Remote-Mouse?id=16144
@ Dave. Have not seen that one before and I like it. Have a feeling that I will be using this skill for many things. Need to dive in and see how the hypothetical mouse click works etc. For us a lot of times just talking it over will start the gears turning in our head and will come up with the answer the next day. Just need to understand the guts of how it all works and then we can do all kinds of things with it.
I hope it works for you. It's been so long sense I used it I can't remember much about it. However I do remember much of it has to do with the exact location of your window in Pixels. Once you install the skill you can make stand alone scripts. There is no place in this skill to set up the skill or make a script. Once you start a new script you can either right click in it to get the ControlCommand JS commands or use the Cheat Sheet to the right of the script consol. Here a list that I found when I did this:
controlCommand("Remote Mouse", "LeftClick"); controlCommand("Remote Mouse", "MoveDown", PixelCount); controlCommand("Remote Mouse", "MoveLeft", PixelCount); controlCommand("Remote Mouse", "MoveRight", PixelCount); controlCommand("Remote Mouse", "MoveUp", PixelCount); controlCommand("Remote Mouse", "RightClick"); controlCommand("Remote Mouse", "SetAbsolute", x, y); controlCommand("Remote Mouse", "WindowLocation", x, y, width, height); controlCommand("Remote Mouse", "WindowMaximize"); controlCommand("Remote Mouse", "WindowMinimize"); controlCommand("Remote Mouse", "WindowRestore");