How to do auto click the button

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dhlyy
Posts: 1
Joined: 23 May 2024, 23:00

How to do auto click the button

23 May 2024, 23:04

Code: Select all

^`::
Run Chrome.exe http://192.168.195.171/TESTahk.PHP/?name=%clipboard%
click Chrome.exe document.getElementById(“btn”)

this is my autohotkey code for me to load the php script

Code: Select all

<?php
if (isset($_GET['name'])) {
    $name = htmlspecialchars($_GET['name']);
    $greeting =  "Hello " . $name;
    echo '<form method="post">';
    echo '<input id="greed" name="greed" type="text" value="' . htmlspecialchars($greeting) . '">';
    echo '<input id="duplicate" name="duplicate" type="text">';
    echo '<input type="submit" name="submit" id="btn" value="Duplicate">';
    echo '</form>';
} else {
    echo "Name not provided!";
}

if(isset($_POST['submit'])) {
    if(isset($_POST['greed'])) {
        $duplicateValue = htmlspecialchars($_POST['greed']);
        echo '<p>Duplicated value: ' . $duplicateValue . '</p>';
    } else {
        echo '<p>No value provided to duplicate.</p>';
    }
}
?>
above is my php code. I want to do when I copy the word then press ctrl + ` then it will run the php code and auto click the button


[Mod edit: Removed the quote tags from around each of the code boxes. It implies it is quoting someone else, so please don’t do that.]

[Mod action: Moved topic to the v1 section since this is apparently meant to be v1 code. The main section is for v2.]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 345 guests