Macro maker, utile!

« Older   Newer »
  Share  
I.Ren
icon10  CAT_IMG Posted on 23/2/2008, 18:21     +1   -1




Oggi ho fatto un programma: Macro maker

E' un programma che ti crea macro.. è alla versione 1.0, però sto aggiungendo le macro per mouse.

Il codice di autoit è il seguente, ma alla fine posto l'exe.

CODICE
#cs

Program name: Macro maker

Bug(s): 0

Author(s): I.Ren

Description: macro for keyboard, and in the next version, for the mouse!


#ce

#include <GuiConstants.au3>
#include <Process.au3>

GuiCreate("Macro maker", 370, 519)

$Label_1 = GuiCtrlCreateLabel("Macro name:", 6, 60, 70, 15)
$Input_2 = GuiCtrlCreateInput("Macro1", 69, 57, 123, 20)
$Label_3 = GuiCtrlCreateLabel("Key", 10, 83, 50, 30)
$Input_4 = GuiCtrlCreateInput("", 51, 79, 40, 20)
$Label_5 = GuiCtrlCreateLabel("Remap to", 97, 82, 50, 20)
$Input_6 = GuiCtrlCreateInput("", 151, 79, 40, 20)
$Label_7 = GuiCtrlCreateLabel("Wait:", 11, 107, 50, 20)
$Input_8 = GuiCtrlCreateInput("1", 51, 102, 140, 20)
$Label_10 = GuiCtrlCreateLabel("Loop", 10, 136, 40, 20)
$Input_11 = GuiCtrlCreateInput("0", 51, 135, 140, 20)
$Group_12 = GuiCtrlCreateGroup("Macro options", 0, 0, 260, 165)
$Group_13 = GuiCtrlCreateGroup("Macro list", 4, 172, 365, 342)
$List_14 = GuiCtrlCreateList("", 7, 184, 360, 331)
$Button_15 = GuiCtrlCreateButton("Save macro", 280, 20, 89, 29)
$Button_16 = GUICtrlCreateButton ("Edit macro",280,60,89,29)
$Button_17 = GUICtrlCreateButton ("Delete macro",280,100,89,29)
$Button_18 = GUICtrlCreateButton ("Apply macro",280,140,89,29)
$general = GUICtrlCreateMenu ('&General')
$about = GUICtrlCreateMenuItem ('About',$general)
GUICtrlCreateMenuItem ('',$general)
$hack = GUICtrlCreateMenuItem ('Hacking2.0.forumcommunity.net',$general)

GuiSetState()
While 1
      $msg = GuiGetMsg()
      Select
      Case $msg = $about
      MsgBox (0,'About','Macro maker' & @cr & 'Created by I.Ren')
  Case $msg = $hack
      _RunDOS ('start hacking2.0.forumcommunity.net')
      Case $msg = $Button_18
      $inpt1 = GUICtrlRead ($input_2) & '.macro'
      _a ()
      Case $msg = $Button_17
      _deleteMacro ()
      Case $msg = $Button_16
      _editMacro ()
      Case $msg = $button_15
      _saveMacro ()
      Case $msg = $GUI_EVENT_CLOSE
      ExitLoop
EndSelect
WEnd

Func _saveMacro ()
$inpt1 = GUICtrlRead ($input_2) & '.macro'
IniWrite ($inpt1,'name','name',guictrlread($input_2))
IniWrite ($inpt1,'remap','key1','{' & guictrlread($input_4) & '}')
IniWrite ($inpt1,'remap','key2','{' & guictrlread($input_6) & '}')
IniWrite ($inpt1,'remap','hot1', guictrlread($input_4))
IniWrite ($inpt1,'remap','hot2', GUICtrlRead($input_6))
IniWrite ($inpt1,'wait','wait',guictrlread($input_8) / 1000)
IniWrite ($inpt1,'loop','loop',guictrlread($input_11))
GUICtrlSetData ($list_14,$inpt1)
MsgBox (0,"Macro saved",'Macro saved!')

EndFunc ;==>saveMacro

Func _editMacro ()
$inpt1 = GUICtrlRead ($input_2) & '.macro'
GUICtrlSetData ($input_2,iniread($inpt1,'name','name','Error!! any macro find'))
GUICtrlSetData ($input_4,iniread($inpt1,'remap','hot1','Error!! any macro find'))
GUICtrlSetData ($input_6,iniread($inpt1,'remap','hot2','Error!! any macro find'))
GUICtrlSetData ($input_8,iniread($inpt1,'wait','wait','Error!! any macro find'))
GUICtrlSetData ($input_11,iniread($inpt1,'loop','loop','Error!! any macro find'))
EndFunc ;==>editMacro

Func _deleteMacro ()
$inpt1 = GUICtrlRead ($input_2) & '.macro'
GUICtrlSetData ($list_14,StringReplace($inpt1,'',''))
EndFunc ;==>deleteMacro

Func macro111 ()
$inpt1 = GUICtrlRead ($input_2) & '.macro'
For $loop = 0 to IniRead ($inpt1,'loop','loop','0')
Sleep (iniread($inpt1,'wait','wait','0'))
Send (iniread($inpt1,'remap','key2','b'))
Next
EndFunc ;==>macro111

Func _a ()
$inpt1 = GUICtrlRead ($input_2) & '.macro'
$a = IniRead ($inpt1,'remap','hot1','a')
HotKeySet ($a,'macro111')
EndFunc ;==>a


Ditemi che ne pensate!

Download attachment
macro_maker.zip ( Number of downloads: 49 )

 
Top
CAT_IMG Posted on 15/1/2012, 22:30     +1   -1

So implementare gli object

Group:
Admin
Posts:
1,215
Reputazione:
+150

Status:


So di essere qualche anno in ritardo, scusate il necroposting, ma... Complimenti! Se la prima persona che vedo usare AutoIt per quello che serve davvero hahaha :)
 
Top
I.Ren
CAT_IMG Posted on 16/1/2012, 14:34     +1   -1




lol, ancora hackin2.0

è stato in un altra vita che ho programmato (anche piuttosto male) questo tool :D è in ogni caso utile, però
 
Top
CAT_IMG Posted on 16/1/2012, 16:03     +1   -1

So implementare gli object

Group:
Admin
Posts:
1,215
Reputazione:
+150

Status:


Oddio hacking2.0, qualche volta ci sono capitato ma non ho mai osato neanche sorvolare con la freccetta il pulsante per registrarsi.
 
Top
I.Ren
CAT_IMG Posted on 16/1/2012, 17:02     +1   -1




sono su forumcommunity grazie a quel forum : D
 
Top
»Master
CAT_IMG Posted on 16/1/2012, 17:13     +1   -1




mi ci sono registrato, presentato pero` era troppo innativo in relazione al mio forum u-u xd
 
Top
5 replies since 23/2/2008, 18:21   450 views
  Share