function asmToLuaScript() if aFrm2 then aFrm2.Show() else DP1=getScreenDPI()/96 aFrm2=createForm(MainForm) aFrm2.height=270*DP1 aFrm2.width=500*DP1 aFrm2.left=261*DP1 aFrm2.top=98*DP1 aFrm2.PopupMode=0 aFrm2.caption="aFrm2" aFrm2.Font.Color = 0xffffff aFrm2.Position="poDesktopCenter" aFrm2.BorderStyle="bsNone" aFrm2.ShowInTaskBar="stAlways" aFrm2.setLayeredAttributes(0x000100, 255, LWA_COLORKEY | LWA_ALPHA ) aFrm2.Color=0x000100 ------------------------- chrome.exe+FD8D0 - call chrome.exe+FD8DA local frmnm = {} ----------------------- frmnm.mnPnl1 -----  frmnm.mnPnl1=createPanel(aFrm2) frmnm.mnPnl1.AutoSize=false frmnm.mnPnl1.height=30*DP1 frmnm.mnPnl1.width=480*DP1 frmnm.mnPnl1.left=10*DP1 frmnm.mnPnl1.top=5*DP1 frmnm.mnPnl1.color=4342338 frmnm.mnPnl1.cursor = -22 frmnm.mnPnl1.caption="ASM code testing in Lua script!" frmnm.mnPnl1.Font.Style="fsBold" frmnm.mnPnl1.Font.Size=12*DP1 frmnm.mnPnl1.OnMouseDown = function() aFrm2.DragNow() end ----------------------- ----------------------- frmnm.aBtn1 -----  frmnm.aBtn1=createButton(frmnm.mnPnl1) frmnm.aBtn1.AutoSize=false frmnm.aBtn1.height=25*DP1 frmnm.aBtn1.width=25*DP1 frmnm.aBtn1.left=5*DP1 frmnm.aBtn1.top=3*DP1 frmnm.aBtn1.caption="--" frmnm.aBtn1.Font.Style="fsBold" frmnm.aBtn1.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.aBtn2 -----  frmnm.aBtn2=createButton(frmnm.mnPnl1) frmnm.aBtn2.AutoSize=false frmnm.aBtn2.height=25*DP1 frmnm.aBtn2.width=25*DP1 frmnm.aBtn2.left=450*DP1 frmnm.aBtn2.top=3*DP1 frmnm.aBtn2.caption="X" frmnm.aBtn2.Font.Style="fsBold" frmnm.aBtn2.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.mnPnl2 -----  frmnm.mnPnl2=createPanel(aFrm2) frmnm.mnPnl2.AutoSize=false frmnm.mnPnl2.height=220*DP1 frmnm.mnPnl2.width=480*DP1 frmnm.mnPnl2.left=10*DP1 frmnm.mnPnl2.top=40*DP1 frmnm.mnPnl2.color=4342338 frmnm.mnPnl2.alignment="2" frmnm.mnPnl2.Font.Style="fsBold" frmnm.mnPnl2.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aBtn3 -----  frmnm.aBtn3=createButton(frmnm.mnPnl2) frmnm.aBtn3.AutoSize=false frmnm.aBtn3.height=22*DP1 frmnm.aBtn3.width=225*DP1 frmnm.aBtn3.left=5*DP1 frmnm.aBtn3.top=3*DP1 frmnm.aBtn3.caption="▼ [ ENABLE Code ] ▼ [ Clear ]" frmnm.aBtn3.Font.Style="fsBold" frmnm.aBtn3.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aBtn4 -----  frmnm.aBtn4=createButton(frmnm.mnPnl2) frmnm.aBtn4.AutoSize=false frmnm.aBtn4.height=22*DP1 frmnm.aBtn4.width=225*DP1 frmnm.aBtn4.left=250*DP1 frmnm.aBtn4.top=3*DP1 frmnm.aBtn4.caption="▼ [ DISABLE Code ] ▼ [ Clear ]" frmnm.aBtn4.Font.Style="fsBold" frmnm.aBtn4.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aMemo1 -----  frmnm.aMemo1=createMemo(frmnm.mnPnl2) frmnm.aMemo1.AutoSize=false frmnm.aMemo1.height=160*DP1 frmnm.aMemo1.width=225*DP1 frmnm.aMemo1.left=5*DP1 frmnm.aMemo1.top=30*DP1 frmnm.aMemo1.alignment="taLeftJustify" frmnm.aMemo1.Font.Style="fsBold" frmnm.aMemo1.Color=6381921 frmnm.aMemo1.ScrollBars="ssAutoBoth" frmnm.aMemo1.wordWrap=false ----------------------- ----------------------- frmnm.aMemo2 -----  frmnm.aMemo2=createMemo(frmnm.mnPnl2) frmnm.aMemo2.AutoSize=false frmnm.aMemo2.height=110*DP1 frmnm.aMemo2.width=225*DP1 frmnm.aMemo2.left=250*DP1 frmnm.aMemo2.top=30*DP1 frmnm.aMemo2.alignment="taLeftJustify" frmnm.aMemo2.Font.Style="fsBold" frmnm.aMemo2.Color=6381921 frmnm.aMemo2.ScrollBars="ssAutoBoth" frmnm.aMemo2.wordWrap=false ----------------------- ----------------------- frmnm.aCBx1 -----  frmnm.aCBx1=createComboBox(frmnm.mnPnl2) frmnm.aCBx1.AutoSize=true frmnm.aCBx1.height=23*DP1 frmnm.aCBx1.width=110*DP1 frmnm.aCBx1.left=5*DP1 frmnm.aCBx1.top=193*DP1 frmnm.aCBx1.text="" frmnm.aCBx1.Font.Style="fsBold" frmnm.aCBx1.Font.Size=9*DP1 frmnm.aCBx1.ReadOnly=false frmnm.aCBx1.Style="csDropDownList" frmnm.aCBx1.ItemIndex=0 ----------------------- ----------------------- frmnm.aCBx2 -----  frmnm.aCBx2=createComboBox(frmnm.mnPnl2) frmnm.aCBx2.AutoSize=true frmnm.aCBx2.height=23*DP1 frmnm.aCBx2.width=110*DP1 frmnm.aCBx2.left=120*DP1 frmnm.aCBx2.top=193*DP1 frmnm.aCBx2.text="" frmnm.aCBx2.Font.Style="fsBold" frmnm.aCBx2.Font.Size=9*DP1 frmnm.aCBx2.ReadOnly=false frmnm.aCBx2.Style="csDropDownList" frmnm.aCBx2.ItemIndex=0 ----------------------- ----------------------- frmnm.aLbl1 -----  frmnm.aLbl1=createLabel(frmnm.mnPnl2) frmnm.aLbl1.AutoSize=false frmnm.aLbl1.height=15*DP1 frmnm.aLbl1.width=225*DP1 frmnm.aLbl1.left=250*DP1 frmnm.aLbl1.top=145*DP1 frmnm.aLbl1.caption="Value and Key: Start - Key1 - Key2" frmnm.aLbl1.alignment="taCenter" frmnm.aLbl1.Font.Style="fsBold" frmnm.aLbl1.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt1 -----  frmnm.aEdt1=createEdit(frmnm.mnPnl2) frmnm.aEdt1.AutoSize=false frmnm.aEdt1.height=25*DP1 frmnm.aEdt1.width=27*DP1 frmnm.aEdt1.left=250*DP1 frmnm.aEdt1.top=165*DP1 frmnm.aEdt1.text="" frmnm.aEdt1.color=6381921 frmnm.aEdt1.Font.Style="fsBold" frmnm.aEdt1.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt2 -----  frmnm.aEdt2=createEdit(frmnm.mnPnl2) frmnm.aEdt2.AutoSize=false frmnm.aEdt2.height=25*DP1 frmnm.aEdt2.width=30*DP1 frmnm.aEdt2.left=280*DP1 frmnm.aEdt2.top=165*DP1 frmnm.aEdt2.text="" frmnm.aEdt2.color=6381921 frmnm.aEdt2.Font.Style="fsBold" frmnm.aEdt2.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt3 -----  frmnm.aEdt3=createEdit(frmnm.mnPnl2) frmnm.aEdt3.AutoSize=false frmnm.aEdt3.height=25*DP1 frmnm.aEdt3.width=30*DP1 frmnm.aEdt3.left=335*DP1 frmnm.aEdt3.top=165*DP1 frmnm.aEdt3.CharCase = "ecUppercase" frmnm.aEdt3.color=6381921 frmnm.aEdt3.Font.Style="fsBold" frmnm.aEdt3.Alignment="taCenter" ----------------------- ----------------------- frmnm.aEdt4 -----  frmnm.aEdt4=createEdit(frmnm.mnPnl2) frmnm.aEdt4.AutoSize=false frmnm.aEdt4.height=25*DP1 frmnm.aEdt4.width=27*DP1 frmnm.aEdt4.left=370*DP1 frmnm.aEdt4.top=165*DP1 frmnm.aEdt4.CharCase = "ecUppercase" frmnm.aEdt4.color=6381921 frmnm.aEdt4.Font.Style="fsBold" frmnm.aEdt4.Alignment="taCenter" ----------------------- ----------------------- frmnm.aChk2 -----  frmnm.aChk2=createCheckBox(frmnm.mnPnl2) frmnm.aChk2.AutoSize=true frmnm.aChk2.height=12*DP1 frmnm.aChk2.width=12*DP1 frmnm.aChk2.left=312*DP1 frmnm.aChk2.top=161*DP1 frmnm.aChk2.caption="" frmnm.aChk2.alignment="taRightJustify" frmnm.aChk2.Font.Style="fsBold" frmnm.aChk2.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aChk2 -----  frmnm.aChk3=createCheckBox(frmnm.mnPnl2) frmnm.aChk3.AutoSize=true frmnm.aChk3.height=12*DP1 frmnm.aChk3.width=12*DP1 frmnm.aChk3.left=312*DP1 frmnm.aChk3.top=175*DP1 frmnm.aChk3.caption="" frmnm.aChk3.alignment="taRightJustify" frmnm.aChk3.Font.Style="fsBold" frmnm.aChk3.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aChk1 -----  frmnm.aChk1=createCheckBox(frmnm.mnPnl2) frmnm.aChk1.AutoSize=true frmnm.aChk1.height=19*DP1 frmnm.aChk1.width=91*DP1 frmnm.aChk1.left=250*DP1 frmnm.aChk1.top=195*DP1 frmnm.aChk1.caption="Enable Script" frmnm.aChk1.alignment="taRightJustify" frmnm.aChk1.Font.Style="fsBold" frmnm.aChk1.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aBtn5 -----  frmnm.aBtn5=createButton(frmnm.mnPnl2) frmnm.aBtn5.AutoSize=false frmnm.aBtn5.height=25*DP1 frmnm.aBtn5.width=70*DP1 frmnm.aBtn5.left=405*DP1 frmnm.aBtn5.top=164*DP1 frmnm.aBtn5.caption="Create Key" frmnm.aBtn5.Font.Style="fsBold" frmnm.aBtn5.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aBtn6 -----  frmnm.aBtn6=createButton(frmnm.mnPnl2) frmnm.aBtn6.AutoSize=false frmnm.aBtn6.height=25*DP1 frmnm.aBtn6.width=125*DP1 frmnm.aBtn6.left=350*DP1 frmnm.aBtn6.top=192*DP1 frmnm.aBtn6.caption="Create Lua Code" frmnm.aBtn6.Font.Style="fsBold" frmnm.aBtn6.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.mnPnl11 -----  frmnm.mnPnl11=createPanel(aFrm2) frmnm.mnPnl11.AutoSize=false frmnm.mnPnl11.height=30*DP1 frmnm.mnPnl11.width=270*DP1 frmnm.mnPnl11.left=500*DP1 frmnm.mnPnl11.top=5*DP1 frmnm.mnPnl11.color=4342338 frmnm.mnPnl11.cursor = -22 frmnm.mnPnl11.caption="Create Script Edited!" frmnm.mnPnl11.Font.Style="fsBold" frmnm.mnPnl11.Font.Size=12*DP1 frmnm.mnPnl11.OnMouseDown = function() aFrm2.DragNow() end ----------------------- ----------------------- frmnm.mnPnl12 -----  frmnm.mnPnl12=createPanel(aFrm2) frmnm.mnPnl12.AutoSize=false frmnm.mnPnl12.height=220*DP1 frmnm.mnPnl12.width=270*DP1 frmnm.mnPnl12.left=500*DP1 frmnm.mnPnl12.top=40*DP1 frmnm.mnPnl12.color=4342338 frmnm.mnPnl12.alignment="2" frmnm.mnPnl12.Font.Style="fsBold" frmnm.mnPnl12.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aLbl11 -----  frmnm.aLbl11=createLabel(frmnm.mnPnl12) frmnm.aLbl11.AutoSize=false frmnm.aLbl11.height=19*DP1 frmnm.aLbl11.width=130*DP1 frmnm.aLbl11.left=5*DP1 frmnm.aLbl11.top=8*DP1 frmnm.aLbl11.caption="Editing Value Name" frmnm.aLbl11.alignment="taCenter" frmnm.aLbl11.OptimalFill=true frmnm.aLbl11.Font.Style="fsBold" frmnm.aLbl11.Font.Size=10*DP1 ----------------------- ----------------------- frmnm.aLbl12 -----  frmnm.aLbl12=createLabel(frmnm.mnPnl12) frmnm.aLbl12.AutoSize=false frmnm.aLbl12.height=19*DP1 frmnm.aLbl12.width=130*DP1 frmnm.aLbl12.left=5*DP1 frmnm.aLbl12.top=30*DP1 frmnm.aLbl12.caption="Change Type Name" frmnm.aLbl12.alignment="taCenter" frmnm.aLbl12.OptimalFill=true frmnm.aLbl12.Font.Style="fsBold" frmnm.aLbl12.Font.Size=10*DP1 ----------------------- ----------------------- frmnm.aLbl13 -----  frmnm.aLbl13=createLabel(frmnm.mnPnl12) frmnm.aLbl13.AutoSize=false frmnm.aLbl13.height=19*DP1 frmnm.aLbl13.width=130*DP1 frmnm.aLbl13.left=5*DP1 frmnm.aLbl13.top=52*DP1 frmnm.aLbl13.caption="First - Stop Value" frmnm.aLbl13.alignment="taCenter" frmnm.aLbl13.OptimalFill=true frmnm.aLbl13.Font.Style="fsBold" frmnm.aLbl13.Font.Size=10*DP1 ----------------------- ----------------------- frmnm.aLbl14 -----  frmnm.aLbl14=createLabel(frmnm.mnPnl12) frmnm.aLbl14.AutoSize=false frmnm.aLbl14.height=19*DP1 frmnm.aLbl14.width=130*DP1 frmnm.aLbl14.left=5*DP1 frmnm.aLbl14.top=74*DP1 frmnm.aLbl14.caption="Next Change Value" frmnm.aLbl14.alignment="taCenter" frmnm.aLbl14.OptimalFill=true frmnm.aLbl14.Font.Style="fsBold" frmnm.aLbl14.Font.Size=10*DP1 ----------------------- ----------------------- frmnm.aLbl15 -----  frmnm.aLbl15=createLabel(frmnm.mnPnl12) frmnm.aLbl15.AutoSize=false frmnm.aLbl15.height=19*DP1 frmnm.aLbl15.width=135*DP1 frmnm.aLbl15.left=2*DP1 frmnm.aLbl15.top=100*DP1 frmnm.aLbl15.caption="Start Key (ControlEditName)" frmnm.aLbl15.alignment="taCenter" frmnm.aLbl15.OptimalFill=true frmnm.aLbl15.Font.Style="fsBold" frmnm.aLbl15.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.aLbl16 -----  frmnm.aLbl16=createLabel(frmnm.mnPnl12) frmnm.aLbl16.AutoSize=false frmnm.aLbl16.height=19*DP1 frmnm.aLbl16.width=135*DP1 frmnm.aLbl16.left=2*DP1 frmnm.aLbl16.top=124*DP1 frmnm.aLbl16.caption="Stop Key (ControlEditName)" frmnm.aLbl16.alignment="taCenter" frmnm.aLbl16.OptimalFill=true frmnm.aLbl16.Font.Style="fsBold" frmnm.aLbl16.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.aLbl17 -----  frmnm.aLbl17=createLabel(frmnm.mnPnl12) frmnm.aLbl17.AutoSize=false frmnm.aLbl17.height=19*DP1 frmnm.aLbl17.width=135*DP1 frmnm.aLbl17.left=2*DP1 frmnm.aLbl17.top=148*DP1 frmnm.aLbl17.caption="Create Key (ControlButtonName)" frmnm.aLbl17.alignment="taCenter" frmnm.aLbl17.OptimalFill=true frmnm.aLbl17.Font.Style="fsBold" frmnm.aLbl17.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.aLbl18 -----  frmnm.aLbl18=createLabel(frmnm.mnPnl12) frmnm.aLbl18.AutoSize=false frmnm.aLbl18.height=19*DP1 frmnm.aLbl18.width=135*DP1 frmnm.aLbl18.left=2*DP1 frmnm.aLbl18.top=172*DP1 frmnm.aLbl18.caption="Enable Script (CheckBoxName)" frmnm.aLbl18.alignment="taCenter" frmnm.aLbl18.OptimalFill=true frmnm.aLbl18.Font.Style="fsBold" frmnm.aLbl18.Font.Size=12*DP1 ----------------------- ----------------------- frmnm.aEdt11 -----  frmnm.aEdt11=createEdit(frmnm.mnPnl12) frmnm.aEdt11.AutoSize=false frmnm.aEdt11.height=20*DP1 frmnm.aEdt11.width=120*DP1 frmnm.aEdt11.left=140*DP1 frmnm.aEdt11.top=5*DP1 frmnm.aEdt11.text="" frmnm.aEdt11.color=6381921 frmnm.aEdt11.Font.Style="fsBold" frmnm.aEdt11.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt12 -----  frmnm.aEdt12=createEdit(frmnm.mnPnl12) frmnm.aEdt12.AutoSize=false frmnm.aEdt12.height=20*DP1 frmnm.aEdt12.width=120*DP1 frmnm.aEdt12.left=140*DP1 frmnm.aEdt12.top=26*DP1 frmnm.aEdt12.text="" frmnm.aEdt12.color=6381921 frmnm.aEdt12.Font.Style="fsBold" frmnm.aEdt12.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt13 -----  frmnm.aEdt13=createEdit(frmnm.mnPnl12) frmnm.aEdt13.AutoSize=false frmnm.aEdt13.height=20*DP1 frmnm.aEdt13.width=120*DP1 frmnm.aEdt13.left=140*DP1 frmnm.aEdt13.top=49*DP1 frmnm.aEdt13.text="" frmnm.aEdt13.color=6381921 frmnm.aEdt13.Font.Style="fsBold" frmnm.aEdt13.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt14 -----  frmnm.aEdt14=createEdit(frmnm.mnPnl12) frmnm.aEdt14.AutoSize=false frmnm.aEdt14.height=20*DP1 frmnm.aEdt14.width=120*DP1 frmnm.aEdt14.left=140*DP1 frmnm.aEdt14.top=72*DP1 frmnm.aEdt14.text="" frmnm.aEdt14.color=6381921 frmnm.aEdt14.Font.Style="fsBold" frmnm.aEdt14.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt15 -----  frmnm.aEdt15=createEdit(frmnm.mnPnl12) frmnm.aEdt15.AutoSize=false frmnm.aEdt15.height=20*DP1 frmnm.aEdt15.width=120*DP1 frmnm.aEdt15.left=140*DP1 frmnm.aEdt15.top=95*DP1 frmnm.aEdt15.text="" frmnm.aEdt15.color=6381921 frmnm.aEdt15.Font.Style="fsBold" frmnm.aEdt15.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt16 -----  frmnm.aEdt16=createEdit(frmnm.mnPnl12) frmnm.aEdt16.AutoSize=false frmnm.aEdt16.height=20*DP1 frmnm.aEdt16.width=120*DP1 frmnm.aEdt16.left=140*DP1 frmnm.aEdt16.top=118*DP1 frmnm.aEdt16.text="" frmnm.aEdt16.color=6381921 frmnm.aEdt16.Font.Style="fsBold" frmnm.aEdt16.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt17 -----  frmnm.aEdt17=createEdit(frmnm.mnPnl12) frmnm.aEdt17.AutoSize=false frmnm.aEdt17.height=20*DP1 frmnm.aEdt17.width=120*DP1 frmnm.aEdt17.left=140*DP1 frmnm.aEdt17.top=141*DP1 frmnm.aEdt17.text="" frmnm.aEdt17.color=6381921 frmnm.aEdt17.Font.Style="fsBold" frmnm.aEdt17.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aEdt18 -----  frmnm.aEdt18=createEdit(frmnm.mnPnl12) frmnm.aEdt18.AutoSize=false frmnm.aEdt18.height=20*DP1 frmnm.aEdt18.width=120*DP1 frmnm.aEdt18.left=140*DP1 frmnm.aEdt18.top=164*DP1 frmnm.aEdt18.text="" frmnm.aEdt18.color=6381921 frmnm.aEdt18.Font.Style="fsBold" frmnm.aEdt18.Font.Size=0*DP1 ----------------------- ----------------------- frmnm.aBtn16 -----  frmnm.aBtn16=createButton(frmnm.mnPnl12) frmnm.aBtn16.AutoSize=false frmnm.aBtn16.height=25*DP1 frmnm.aBtn16.width=120*DP1 frmnm.aBtn16.left=140*DP1 frmnm.aBtn16.top=192*DP1 frmnm.aBtn16.caption="Write Code" frmnm.aBtn16.Font.Style="fsBold" frmnm.aBtn16.Font.Size=0*DP1 ----------------------- --############################################################################-- --############################################################################-- --############################################################################-- frmnm.aBtn1.OnClick=function() aFrm2.WindowState="wsMinimize" end frmnm.aBtn2.OnClick=function() aFrm2.Hide() end frmnm.aBtn3.OnClick=function() frmnm.aMemo1.Clear() end frmnm.aBtn4.OnClick=function() frmnm.aMemo2.Clear() end --############################################################################-- local changeTyp1 local chanceValue1 = "" local startKey1 = VK_F8 local stopKey1 = VK_F9 local incr1 = 1 local rndom1 = 0 local keycheck = 0 frmnm.aChk2.ShowHint = true frmnm.aChk2.Hint = "(Increasing value option.)\nIf enabled: Adds the value in the 2nd box continuously as +.\n(Every time the start switch is clicked.)" frmnm.aChk3.ShowHint = true frmnm.aChk3.Hint = "(Random option.)\nIf enabled: Generates random numbers between the values in boxes 1 and 2.\n(Every time the start switch is clicked.)" frmnm.aEdt1.ShowHint = true frmnm.aEdt2.ShowHint = true frmnm.aEdt3.ShowHint = true frmnm.aEdt4.ShowHint = true frmnm.aCBx1.ShowHint=true frmnm.aCBx2.ShowHint=true frmnm.aEdt1.Hint = "Start and stop value!" frmnm.aEdt2.Hint = "Change, Increase or max random value!" frmnm.aEdt3.Hint = "Change, Increase or Random value Key!" frmnm.aEdt4.Hint = "Stop or first value key!" frmnm.aCBx1.Hint = "Select the memory name to change!" control_setcolor1=(function(s,c) executeCodeLocalEx('uxtheme.SetWindowTheme', s.handle, "", "") s.Font.Color = c s.Color = 4342338 end) control_setcolor1(frmnm.aChk1,0xffffff) control_setcolor1(frmnm.aChk2,0xffffff) control_setcolor1(frmnm.aChk3,0xffffff) frmnm.aCBx1.Items.Add("Editing Value") frmnm.aCBx1.ItemIndex=0 frmnm.aCBx2.Items.Add("Change Type") frmnm.aCBx2.Items.Add("Bytes") frmnm.aCBx2.Items.Add("Double") frmnm.aCBx2.Items.Add("Float") frmnm.aCBx2.Items.Add("Integer") frmnm.aCBx2.Items.Add("Pointer") frmnm.aCBx2.Items.Add("String") frmnm.aCBx2.Items.Add("Qword") frmnm.aCBx2.ItemIndex=0 frmnm.aMemo1.OnChange=function(sender) frmnm.aCBx1.Clear() frmnm.aCBx1.Items.Add("Editing Value") for i=0, sender.Lines.Count -1 do ltext = sender.Lines[i] if string.find(ltext, ":") then --print(ltext) restext = (ltext):sub(1, -2):gsub("%s+","") frmnm.aCBx1.Items.Add(restext) end end frmnm.aCBx1.ItemIndex=0 end frmnm.aCBx2.OnChange=function(sender) indx1 = frmnm.aCBx2.ItemIndex if indx1==1 then changeTyp1=writeBytes elseif indx1==2 then changeTyp1=writeDouble elseif indx1==3 then changeTyp1=writeFloat elseif indx1==4 then changeTyp1=writeInteger elseif indx1==5 then changeTyp1=writePointer elseif indx1==6 then changeTyp1=writeString elseif indx1==7 then changeTyp1=writeQword end return changeTyp1 end --############################################################################-- function enableScrpt1() if frmnm.aChk1.State==1 then if frmnm.aChk2.State==0 and frmnm.aChk3.State==0 then changeTyp1(frmnm.aCBx1.Text,frmnm.aEdt2.Text) else if frmnm.aChk2.State==1 then incr1 = tonumber(incr1) + tonumber(frmnm.aEdt2.Text) changeTyp1(frmnm.aCBx1.Text,incr1) end if frmnm.aChk3.State==1 then rndom1 = math.random(tonumber(frmnm.aEdt1.Text),tonumber(frmnm.aEdt2.Text)) changeTyp1(frmnm.aCBx1.Text,rndom1) end end end end function disableScrpt1() if frmnm.aChk1.State==1 then changeTyp1(frmnm.aCBx1.Text,frmnm.aEdt1.Text) end end if stkey1 then stkey1.Destroy() stkey1=nil end if stkey2 then stkey2.Destroy() stkey2=nil end stkey1=createHotkey(enableScrpt1,startKey1) stkey2=createHotkey(disableScrpt1,stopKey1) frmnm.aEdt3.OnKeyDown=function(sender,key) sender.Text="" if key then startKey1=key sender.Text=convertKeyComboToString(key) end return 0 end frmnm.aEdt4.OnKeyDown=function(sender,key) sender.Text="" stopKey1=key sender.Text=convertKeyComboToString(key) return 0 end frmnm.aEdt3.OnClick=function(sender) sender.Text="" end frmnm.aEdt4.OnClick=function(sender) sender.Text="" end frmnm.aBtn5.OnClick=function() if frmnm.aEdt3.Text~="" then if stkey1 then stkey1.Destroy() stkey1=nil end stkey1=createHotkey(enableScrpt1,startKey1) keycheck=1 else if stkey1 then stkey1.Destroy() stkey1=nil end end if frmnm.aEdt4.Text~="" then if stkey2 then stkey2.Destroy() stkey2=nil end stkey2=createHotkey(disableScrpt1,stopKey1) else if stkey2 then stkey2.Destroy() stkey2=nil end end end frmnm.aChk1.OnChange=function() if frmnm.aMemo1.Lines.Text=="" then frmnm.aChk1.State=0 showMessage("Please write your valid (enabled) asm code in the first box.\n(Without the ENABLE, DISABLE lines.)") elseif frmnm.aMemo2.Lines.Text=="" then frmnm.aChk1.State=0 showMessage("Please enter your valid (disabled) asm code in the second box. (Without the DISABLE lines.)") elseif frmnm.aCBx1.ItemIndex==0 then frmnm.aChk1.State=0 showMessage("Please select the memory name to change!") elseif frmnm.aCBx2.ItemIndex==0 then frmnm.aChk1.State=0 showMessage("Please select the type name to change!") elseif frmnm.aEdt1.Text=="" then frmnm.aChk1.State=0 showMessage("Please write the initial default value!\n(And in case of disable, return to the beginning.)\n(Editbox 1)") elseif frmnm.aEdt3.Text=="" then frmnm.aChk1.State=0 showMessage("Please assign a key that will change the value! (Editbox 3)") else if frmnm.aChk1.State==1 then if keycheck==1 then autoAssemble(frmnm.aMemo1.Lines.Text) incr1 = 1 control_setcolor1(frmnm.aChk1,0x0000ff) end else incr1 = 1 autoAssemble(frmnm.aMemo2.Lines.Text) control_setcolor1(frmnm.aChk1,0xffffff) end end end frmnm.aChk2.OnChange=function() if frmnm.aChk2.State==1 then frmnm.aChk3.State=0 end end frmnm.aChk3.OnChange=function() if frmnm.aChk3.State==1 then frmnm.aChk2.State=0 end end for i=1, #frmnm do frmnm["aEdt"..i].OnClick=function(sender) sender.Text="" end end --############################################################################-- --############################################################################-- --############################################################################-- --############################################################################-- if wTim1 then wTim1.Destroy() wTim1=nil end wTim1=createTimer(MainForm) wTim1.Interval=50 wTim1.Enabled=false local wdt1 = 1 wTim1.OnTimer=function() if wdt1==1 then if aFrm2.Width~=780 then aFrm2.Width = tonumber(aFrm2.Width) + 10 else wdt1=2 wTim1.Enabled=false end else if aFrm2.Width~=500 then aFrm2.Width = tonumber(aFrm2.Width) - 10 else wdt1=1 wTim1.Enabled=false end end end frmnm.aBtn6.OnClick=function() frmnm.aEdt11.text=frmnm.aCBx1.Text frmnm.aEdt12.text="write"..frmnm.aCBx2.Text frmnm.aEdt13.text=frmnm.aEdt1.text frmnm.aEdt14.text=frmnm.aEdt2.text if wTim1.Enabled==false then wTim1.Enabled=true else wTim1.Enabled=false end end --############################################################################-- --############################################################################-- function crtScrptCode1() local textres2 = "" edtv1 = frmnm.aEdt11.text etyp1 = frmnm.aEdt12.text strv1 = frmnm.aEdt13.text stpv1 = frmnm.aEdt14.text exd1 = frmnm.aEdt15.text exd2 = frmnm.aEdt16.text bxd1 = frmnm.aEdt17.text cxd1 = frmnm.aEdt18.text keyvalue1 = string.sub(frmnm.aEdt15.text,-5,-1) keyvalue1 = "key_"..keyvalue1 keyvalue2 = string.sub(frmnm.aEdt16.text,-5,-1) keyvalue2 = "key_"..keyvalue2 keyname3 = string.sub(frmnm.aEdt17.text,-5,-1) keyname2 = "htk2_"..keyname3 keyname1 = "htk1_"..keyname3 increase1 = "incr_"..keyname3 keycheck1 = "check_"..keyname3 typname1 = etyp1 textres2 = textres2..[==[ local ]==]..increase1..[==[ = 0 ]==] textres2 = textres2..[==[ local ]==]..keycheck1..[==[ = 0 ]==] textres2 = textres2..[==[ local ]==]..keyvalue1..[==[ = false ]==] textres2 = textres2..[==[ local ]==]..keyvalue2..[==[ = false ]==] textres2 = textres2..[==[ control_setcolor1=(function(s,c) executeCodeLocalEx('uxtheme.SetWindowTheme', s.handle, "", "") s.Font.Color = c s.Color = 4342338 end) ]==] textres2 = textres2..exd1..[==[.OnKeyDown=function(sender,key) sender.Text="" ]==]..keyvalue1..[==[=key sender.Text=convertKeyComboToString(key) return 0 end ]==]..exd2..[==[.OnKeyDown=function(sender,key) sender.Text="" ]==]..keyvalue2..[==[=key sender.Text=convertKeyComboToString(key) return 0 end ]==]..exd1..[==[.OnClick=function(sender) sender.Text="" end ]==]..exd2..[==[.OnClick=function(sender) sender.Text="" end ]==]..bxd1..[==[.OnClick=function() if ]==]..exd1..[==[.Text~="" then if ]==]..keyname1..[==[ then ]==]..keyname1..[==[.Destroy() ]==]..keyname1..[==[=nil end ]==]..keyname1..[==[=createHotkey(enable]==]..keyname1..[==[,]==]..keyvalue1..[==[) ]==]..keycheck1..[==[=1 else if ]==]..keyname1..[==[ then ]==]..keyname1..[==[.Destroy() ]==]..keyname1..[==[=nil end end if ]==]..exd2..[==[.Text~="" then if ]==]..keyname2..[==[ then ]==]..keyname2..[==[.Destroy() ]==]..keyname2..[==[=nil end ]==]..keyname2..[==[=createHotkey(disable]==]..keyname2..[==[,]==]..keyvalue2..[==[) else if ]==]..keyname2..[==[ then ]==]..keyname2..[==[.Destroy() ]==]..keyname2..[==[=nil end end end ]==] textres2 = textres2..[==[ function enable]==]..keyname1..[==[() ]==] if frmnm.aChk2.State==0 and frmnm.aChk3.State==0 then textres2 = textres2..[==[ if ]==]..cxd1..[==[.State==1 then ]==]..typname1..[==[(]==]..edtv1..[==[,]==]..stpv1..[==[) end ]==] end if frmnm.aChk2.State==1 then textres2 = textres2 ..[==[ if ]==]..cxd1..[==[.State==1 then ]==]..increase1..[==[ = tonumber(]==]..increase1..[==[) + tonumber(]==]..stpv1..[==[) ]==]..typname1..[==[("]==]..edtv1..[==[",]==]..increase1..[==[) end ]==] end if frmnm.aChk3.State==1 then textres2 = textres2..[==[ if ]==]..cxd1..[==[.State==1 then rndom1 = math.random(tonumber(]==]..strv1..[==[),tonumber(]==]..stpv1..[==[)) ]==]..typname1..[==[("]==]..edtv1..[==[",rndom1) end end ]==] end textres2 = textres2..[==[ function disable]==]..keyname2..[==[() if ]==]..cxd1..[==[.State==1 then ]==]..typname1..[==[("]==]..edtv1..[==[",]==]..strv1..[==[) end end ]==] textres2 = textres2..[==[ ]==]..cxd1..[==[.OnChange=function() if ]==]..cxd1..[==[.State==1 then if ]==]..keycheck1..[==[==1 then autoAssemble([[ ]==]..frmnm.aMemo1.Lines.Text..[==[ ]]) ]==]..increase1..[==[ = 1 control_setcolor1(]==]..cxd1..[==[,0x0000ff) end else ]==]..increase1..[==[ = 1 autoAssemble([[ ]==]..frmnm.aMemo2.Lines.Text..[==[ ]]) control_setcolor1(]==]..cxd1..[==[,0xffffff) end end ]==] return textres2 end --############################################################################-- frmnm.aBtn16.OnClick=function() rescode2 = crtScrptCode1() print(rescode2) writeToClipboard(rescode2) showMessage("Code output copied.") end end end --############################################################################-- --############################################################################-- --############################################################################-- --asmToLuaScript() local mf = MainForm mfmi = mf.Menu.Items if miAsmToLuaS then miAsmToLuaS.Destroy() miAsmToLuaS=nil end miAsmToLuaS = createMenuItem(mf.mfmi) miAsmToLuaS.Name = 'miAsmToLuaS' miAsmToLuaS.Caption = 'AtLS' mfmi.insert(mfmi.Count-1,miAsmToLuaS) miAsmToLuaMn = createMenuItem(miAsmToLuaS) miAsmToLuaMn.Caption = 'AsmToLuaScript' miAsmToLuaMn.onClick = asmToLuaScript miAsmToLuaS.add(miAsmToLuaMn) --############################################################################-- --############################################################################-- --############################################################################--