Jump to content

any way can covert Autohotkey script to AutoIt script?


Recommended Posts

both are .ank files, but seems AutoIt can't open Autohotkey scripts...

thanks.

They aren't interchangable, what did you expect? You have to go through the AHK script by hand and convert it line by line.

Link to comment
Share on other sites

Also, AutoIt files are not ank. Where did you think that? AutoIt's extension is au3 (or aut in older versions).

oh yea it's .au3 sry my mistake.

I have some really nice working .auk scripts, it would be great if I am able to convert them to .au3...

Link to comment
Share on other sites

oh yea it's .au3 sry my mistake.

I have some really nice working .auk scripts, it would be great if I am able to convert them to .au3...

You can convert them. If you post an example we can provide tips on what syntax will need changed.

Link to comment
Share on other sites

You can convert them. If you post an example we can provide tips on what syntax will need changed.

sexy!!! well this is the Autohotkey script... it's a lot... I made this script by some other program.

#SingleInstance force   ;force a single instance
#HotkeyInterval 0   ;disable the warning dialog if a key is held down
#InstallKeybdHook   ;Forces the unconditional installation of the keyboard hook
#UseHook On     ;might increase responsiveness of hotkeys
#MaxThreads 20      ;use 20 (the max) instead of 10 threads
SetBatchLines, -1   ;makes the script run at max speed
SetKeyDelay , -1, -1    ;faster response (might be better with -1, 0)
;Thread, Interrupt , -1, -1;not sure what this does, could be bad for timers
SetTitleMatchMode, 3;title Warcraft III must match exactly
SetDefaultMouseSpeed, 0;Move the mouse faster for mouse moving commands

IfExist, Warcraft III.ico
  menu, tray, Icon, Warcraft III.ico, 1, 1

;;;;; Variables;;;;;
bInChatRoom := False
bHealthBarOn := False
;;;;; Timers;;;;;
;; this timer checks to see if warcraft is active and turns on the health bars
settimer, timer_Warcraft, 1000;check every 1 second
timer_Warcraft:
{
  ifWinActive, Warcraft III ahk_class Warcraft III
  {
    if ( (bHealthBarOn == False) && (A_IsSuspended == false) )
    {
      SendPlay, {[ Down}{] Down}
      bHealthBarOn := True
    }
    if (A_IsSuspended == false)
      SetScrollLockState, On
    else
      SetScrollLockState, Off
  }
  else ifWinNotActive, Warcraft III ahk_class Warcraft III
  {
    if (bHealthBarOn == True)
    {
      SendPlay, {[ Up}{] Up}
      bHealthBarOn := False
      SetScrollLockState, Off
    }
  }
}

Return; End Auto-Execute Section

; AutoCast Function
AutoCast(iSpellQWERHotkey)
{
  MouseGetPos, iMousePosX, IMousePosY
  if (iSpellQWERHotkey == 1)
  {
    iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 2)
  {
    iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 3)
  { iMouseGotoX := A_ScreenWidth*4//5
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 4)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 5)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 6)
  {
    iMouseGotoX := A_ScreenWidth*17//20
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 7)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 8)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 9)
  {
    iMouseGotoX := A_ScreenWidth*9//10
    iMouseGotoY := A_ScreenHeight*19//20
  }
  else if (iSpellQWERHotkey == 10)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*4//5
  }
  else if (iSpellQWERHotkey == 11)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*22//25
  }
  else if (iSpellQWERHotkey == 12)
  {
    iMouseGotoX := A_ScreenWidth*19//20
    iMouseGotoY := A_ScreenHeight*19//20
  }
  Click, Right, %iMouseGotoX%, %iMouseGotoY%
  MouseMove, %iMousePosX%, %iMousePosY%
}

#ifWinActive, Warcraft III ahk_class Warcraft III

;;;;; Enable/disable all hotkeys;;;;;
~*Enter::
~*NumpadEnter::
Suspend, Permit
if (bInChatRoom == True)
  return
Suspend
if (A_IsSuspended == true)
{
  SoundPlay,*64
  SetScrollLockState, Off
}
else
{
  SoundPlay,*48
  SetScrollLockState, On
}
return

;; Escape will cancel chatting, so turn the hotkeys back on
~*Esc::
Suspend, Permit
if (bInChatRoom == True)
  return
Suspend, Off
SoundPlay,*48
SetScrollLockState, On

;;;;; Toggle health on/off;;;;;
;; the health bars are automatic now and cannot be turned off
;; however if for some reason they get turned off, pressing this key will turn it on
*NumpadIns::
bHealthBarOn := not bHealthBarOn
if (bHealthBarOn == true)
  SendPlay, {[ Down}{] Down}
else
  SendPlay, {[ Up}{] Up}
return






;;;; Scroll Lock to toggle follow mode (useful in replays);;;;;
*Home::
Send, {Blind}{Home}; toggle the light
if FollowOn
  Send, {LButton Up}
else
  Send, {LButton Down}
FollowOn := not FollowOn
return




*ScrollLock::
Suspend, Permit
bInChatRoom := not bInChatRoom
if (bInChatRoom == True)
{
  Suspend, On
  SetScrollLockState, Off
  SoundPlay,*64
}
else
{
  Suspend, Off
  SetScrollLockState, On
  SoundPlay,*48
}
return

; Disable Left Windows Key
Lwin::return
; Disable Left Alt-Q GG
<!q::return

; Inventory Keys: 


;~F4::Numpad7
~z::Numpad1
~x::Numpad2

; Hotkeys Remapper:

; - xv -

~-::AutoCast(3)
~=::AutoCast(6)


~4::AutoCast(3)
~5::AutoCast(6)

; User Specified Hotkeys:
F5::SendPlay, +{Enter}-ap{Enter}{Enter}-Di{Enter}+{Enter}GL HF all {!}{Enter}

F6::SendPlay, +/hostbnetpublic dota 
F7::SendPlay, {Enter}-Ma{Enter}{Enter}-Ms{Enter}{Enter}{!}{Enter}
Link to comment
Share on other sites

  • Developers

sexy!!! well this is the Autohotkey script... it's a lot... I made this script by some other program.

I vaguely remember somebody posting his/her opinion about this forum and not being willing to help bot scripters.

Also believe I argued that these type of scripters just "want things done for them" and don't show any effort themselves.

I rest my case .

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

sexy!!! well this is the Autohotkey script... it's a lot... I made this script by some other program.

Do pray tell, what was the name of the other program and why didn't it have a AutoIT output option?
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...