jor123

Convert AHK code to AU3.

5 posts in this topic

#1 ·  Posted

Hello people.
I have a code in AHK and wanted the same code to work on AU3.
The code is simple and to help here in the transport company to know which city to order.
Someone could convert this code to me because I have little knowledge in AU3, already thank you for the help.
The code in AHK is as follows:

#NoTrayIcon

Gui , + ToolWindow


#Persistent
OnClipboardChange:
city := Clipboard
if RegExMatch(city, "i)^[0-9-A-Z]{12}$")
{
    region := SubStr(city, 1, 1)
    
    if (region = "1")
    {
        Clipboard := "south"
    }
    else if (region = "2")
    {
        Clipboard := "north"
    }
    else if (region = "3")
    {
        Clipboard := "east"
    }
else if (region = "4")
    {
        Clipboard := "west"
    }

}

if RegExMatch(city, "i)^[0-9-A-Z]{16}$")
{
    region := SubStr(city, 1, 1)


  if (region = "T")
    {
        Clipboard := "Mexico"
    }
else if (region = "K")
    {
        Clipboard := "Uruguay"
    }
    
}
return

Share this post


Link to post
Share on other sites



#2 ·  Posted

Hello people.
I have a code in AHK and wanted the same code to work on AU3.
The code is simple and to help here in the transport company to know which city to order.
Someone could convert this code to me because I have little knowledge in AU3, already thank you for the help.
The code in AHK is as follows:

#NoTrayIcon

Gui , + ToolWindow


#Persistent
OnClipboardChange:
city := Clipboard
if RegExMatch(city, "i)^[0-9-A-Z]{12}$")
{
    region := SubStr(city, 1, 1)
    
    if (region = "1")
    {
        Clipboard := "south"
    }
    else if (region = "2")
    {
        Clipboard := "north"
    }
    else if (region = "3")
    {
        Clipboard := "east"
    }
else if (region = "4")
    {
        Clipboard := "west"
    }

}

if RegExMatch(city, "i)^[0-9-A-Z]{16}$")
{
    region := SubStr(city, 1, 1)


  if (region = "T")
    {
        Clipboard := "Mexico"
    }
else if (region = "K")
    {
        Clipboard := "Uruguay"
    }
    
}
return

Share this post


Link to post
Share on other sites

#3 ·  Posted

Ok, so in order for anyone to help you, you will need to clearly explain what you want the code to do.  What you have posted by itself makes no sense.  What are you specifically trying to have the application do, lets start there.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This is a double post.  Will a moderator please take appropriate action....  Exact same post in Developer general discussion.

Edited by MattHiggs

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

@jor123 stick to one thread from now on. 

@MattHiggs that is why we have a report button, so you can let us know these things instead of waiting for us to stumble upon them.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now