|
You last visited: Today at 11:40
Advertisement
Problem with script
Discussion on Problem with script within the AutoIt forum part of the Coders Den category.
01/20/2014, 19:14
|
#1
|
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
|
Problem with script
Hey i have next problem with this script, all work fine only when i want to turn it off i cant i must do that in on tray icon. Anyone know where problem is ?
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <File.au3>
$GUI = GUICreate("AL - macro", 409, 145, 265, 434)
GUISetFont(9, 400, 0, "Tahoma")
$Group1 = GUICtrlCreateGroup("Input keys", 8, 5, 393, 50)
$textInput = GUICtrlCreateInput("", 16, 24, 376, 22)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Cast time", 8, 56, 393, 49)
$Slider1 = GUICtrlCreateSlider(16, 77, 374, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS))
GUICtrlSetLimit(-1, 99, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$startBtn = GUICtrlCreateButton("Start", 8, 112, 75, 25)
GUISetState(@SW_SHOW)
_load()
HotKeySet("^x", "_spam")
Global $run
Global $handle
If Not FileExists("C:\Program Files\config.ini") Then _FileCreate("C:\Program Files\config.ini")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_save()
GUIDelete($GUI)
Exit
Case $startBtn
$handle = WinGetHandle("Archlord")
If ProcessExists("AlefClient.exe") Then
If WinExists($handle) Then WinActivate($handle)
TrayTip("AL - macro running", "Press CTRL + x to start", 10, 1)
GUICtrlSetState($startBtn, $GUI_DISABLE)
Else
TrayTip("AL - macro running", "Game is not running, start game first", 10, 1)
EndIf
EndSwitch
WEnd
Func _spam()
$run = Not $run
While True
If $run Then
$text = GUICtrlRead($textInput)
$time = 1500
$time = $time - ($time / 100 * GUICtrlRead($Slider1))
ControlSend($handle, "", "", $text)
Sleep($time)
EndIf
WEnd
EndFunc
Func _save()
IniWrite("C:\Program Files\config.ini", "Keys", 1, GUICtrlRead($textInput))
IniWrite("C:\Program Files\config.ini", "Slider", 1, GUICtrlRead($Slider1))
EndFunc
Func _load()
Local $keys, $slider
$keys = IniRead("C:\Program Files\config.ini", "Keys", 1, "")
GUICtrlSetData($textInput, $keys)
$slider = IniRead("C:\Program Files\config.ini", "Slider", 1, "")
GUICtrlSetData($Slider1, $slider)
EndFunc
|
|
|
01/20/2014, 19:21
|
#2
|
elite*gold: 73
Join Date: Dec 2013
Posts: 1,352
Received Thanks: 98
|
I can help you. Add me in Skype.
|
|
|
01/20/2014, 20:02
|
#3
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
hotkeyset on a function that exits or but GuiGetMSg in the loop
|
|
|
01/20/2014, 20:30
|
#4
|
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
|
i solved problem it was in here
Code:
Func _spam()
$run = Not $run
While $run ; this line was While True and i replaced with While $run
If $run Then
$text = GUICtrlRead($textInput)
$time = 1000
$time = $time - ($time / 50 * GUICtrlRead($Slider1))
ControlSend($handle, "", "", $text)
Sleep($time)
EndIf
WEnd
EndFunc
|
|
|
01/20/2014, 21:06
|
#5
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
Quote:
Originally Posted by mlukac89
i solved problem it was in here
Code:
Func _spam()
$run = Not $run
While $run ; this line was While True and i replaced with While $run
If $run Then
$text = GUICtrlRead($textInput)
$time = 1000
$time = $time - ($time / 50 * GUICtrlRead($Slider1))
ControlSend($handle, "", "", $text)
Sleep($time)
EndIf
WEnd
EndFunc
|
$run = Not $run ? isnt that stupid ? $run is not $run
I think you mean False
While $run means While True
|
|
|
01/20/2014, 22:05
|
#6
|
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
|
Now i get it
|
|
|
|
Similar Threads
|
MTA Script Problem!
04/07/2013 - Grand Theft Auto - 2 Replies
Hey Leute ich versuche eine "automessage" zu scripten aber er zeigt mir die ganze Zeit den Error an: WARNING: Loading script failed: automessage/auto_message.lua:1: unexpected symbol near '?'
Und hier mein Script:
function news1 ()
outputChatBox ( "---Info---", getRootElement(), 200, 200, 0 )
outputChatBox ( "You want a own base? Then contact an Admin!, Chat: O", getRootElement(), 200, 200, 0 )
outputChatBox ( "Teamspeak³: GamingZone.nitrado.net:15650", getRootElement(), 200, 200,...
|
Hen Script Problem... -.-
11/04/2010 - Metin2 Private Server - 12 Replies
Joa hallo Leute,
mich plagt seid dem ich das Script eine doofe Fehlermeldung die das Script zum absturz bringt <.< Man kann sich nicht mehr registieren, man kann sich einloggen aber nicht mehr in den Itemshop oder in andere Kategorien, es wird dann angezeigt man solle sich erst einloggen.
Hier mal die Fehlermeldung:
Warning: session_start() : Cannot send session cookie - headers already sent by (output started at C:\xampplite\htdocs\index.php:7) in C:\xampplite\htdocs\index.php on...
|
Problem VB 10 Patcher Script Problem
09/20/2010 - .NET Languages - 8 Replies
Hayho liebe Com.
ich habe mal wieder einen ganz netten Patcher gescriptet, für einen metin2 P Server,
da es nicht mein erster is, hab ich echt kp was da vorliegt, Hier der Script an sich:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles...
|
Problem mit Script
08/10/2010 - AutoIt - 14 Replies
hey,
ich brauche dringend hilfe!!
hab mir ein script für ein spiel gebastelt aber ich schaffe es nicht,
das er einmal auf eine stelle drückt. also wenn er einmal auf die stelle
(524,394, 1, 0) clickt das er dann 1 sekunde nichtmehr dahinklicken kann.
würde das gehen?
wär nett wenn mir jemand helfen könnte :)
mfg Key4To
|
[HOW-TO]Hp-Script+Admin-script (weekly-updatet) problem!
06/21/2010 - Metin2 Private Server - 11 Replies
hallo leute ich hab ein problem und zwar bei dem hp script von masterboss kommt der fehler :
http://img541.imageshack.us/img541/8140/24955249. png
und wenn ich dann die datei öffne und in die zeile gehe kommt:
while($row = mysql_fetch_array($ergebnis))
kann mir jmd helfen?
|
All times are GMT +2. The time now is 11:40.
|
|