continyu Posted August 1, 2008 Posted August 1, 2008 i am working on new script and i am new at autoscript... i am putting 1 input and 1 button @koda.. and i wanna my functions Sleep($input1) like somethin this and iam using this commands $time = GuiCtrlRead($input1) ..bla.bla..bla.. Sleep($time) func bla bla endfunc But it is not waitin anything.. whats the problem?
AdmiralAlkex Posted August 1, 2008 Posted August 1, 2008 My crystal-ball is cloudy today, so the only thing I can tell you is to check the helpfile and if that isn't enough post a reproducer .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
BrettF Posted August 1, 2008 Posted August 1, 2008 It's your code. This works fine with AutoIt version 3.2.12.1 $gui = GUICreate ("Test", 300, 200) $input = GUICtrlCreateInput ("", 10, 10, 280, 20) $button = GUICtrlCreateButton ("Sleep", 240, 35, 50, 25) GUISetState (@SW_SHOW) While 1 $nMSG = GUIGetMsg () Switch $nMSG Case -3 Exit Case $button $time = GUICtrlRead ($input) $timer = TimerInit () ConsoleWrite ("!!!!!!!! STARTING SLEEP FOR " & $time & "ms" & @CRLF) Sleep ($time) ConsoleWrite ("DONE (" & TimerDiff ($timer) & "ms)" & @CRLF) EndSwitch WEnd Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
AdmiralAlkex Posted August 1, 2008 Posted August 1, 2008 @BrettF How dare you release free code?? Watch out or I will come down with my scissors! Hahahaa .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
BrettF Posted August 1, 2008 Posted August 1, 2008 Nah... just running that will cost you 249.99. But for today only, its 149.99... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
continyu Posted August 1, 2008 Author Posted August 1, 2008 thank you BrettFF timer is working but i have another problem now i wanna login a site... so my way is this Global $user = guictrlread(input1) bla..bla..bla.. MouseClick(x,y,left) Send($user) so its not workng.. what do you think?
BrettF Posted August 1, 2008 Posted August 1, 2008 Look at the _IE functions. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
continyu Posted August 1, 2008 Author Posted August 1, 2008 i now ie options but i cant use them for now.. because i wanna send some thing to computer not only internet.. there is no way?
BrettF Posted August 1, 2008 Posted August 1, 2008 More information is needed- think what and those general questions... as Admiral has said, his crystal ball is cloudy, but sadly there was a defect with all of crystal balls when they got handed out, and mine is always cloudy..... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
continyu Posted August 1, 2008 Author Posted August 1, 2008 #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Linksys Modem Reset Program - Kontinyu", 335, 295, 291, 136) GUISetBkColor(0x000000) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize") GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore") $Label1 = GUICtrlCreateLabel("Linksys Modem Reset Program", 24, 8, 296, 30) GUICtrlSetFont(-1, 17, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xA6CAF0) GUICtrlSetOnEvent(-1, "Label1Click") $Button1 = GUICtrlCreateButton("Reset", 40, 160, 265, 65, 0) GUICtrlSetOnEvent(-1, "Button1Click") $ModemIp = GUICtrlCreateInput("ModemIp", 24, 48, 289, 21) GUICtrlSetOnEvent(-1, "ModemIpChange") $Group1 = GUICtrlCreateGroup("Login", 32, 80, 289, 73) GUICtrlSetColor(-1, 0x648BCB) $UserName = GUICtrlCreateInput("UserName", 40, 96, 121, 21) GUICtrlSetOnEvent(-1, "UserNameChange") $Pass = GUICtrlCreateInput("Pass", 40, 128, 121, 21) GUICtrlSetOnEvent(-1, "PassChange") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $start = 0 $ModemIp1 = GUICtrlRead($ModemIp) $UserName1 = GUICtrlRead($UserName) $Pass1 = GUICtrlRead($Pass) While 1 Sleep(100) if $start = 1 Then _Reset () EndIf WEnd Func _reset () #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('C:\Program Files\Mozilla Firefox\firefox.exe') WinWait("Mozilla Firefox","") If Not WinActive("Mozilla Firefox","") Then WinActivate("Mozilla Firefox","") WinWaitActive("Mozilla Firefox","") MouseMove(290,68) MouseDown("left") MouseUp("left") Send($ModemIp1) WinWait("Kimlik doÄŸrulama gerekli","") If Not WinActive("Kimlik doÄŸrulama gerekli","") Then WinActivate("Kimlik doÄŸrulama gerekli","") WinWaitActive("Kimlik doÄŸrulama gerekli","") MouseMove(152,86) MouseDown("left") MouseMove(152,85) MouseUp("left") MouseDown("left") MouseMove(0,75) MouseUp("left") Send($UserName1) MouseMove(161,99) MouseDown("left") MouseMove(162,99) MouseUp("left") MouseMove(192,110) MouseDown("left") MouseMove(37,106) MouseUp("left") Send($Pass1) MouseMove(244,145) MouseDown("left") MouseUp("left") WinWait("Basic Setup - Mozilla Firefox","") If Not WinActive("Basic Setup - Mozilla Firefox","") Then WinActivate("Basic Setup - Mozilla Firefox","") WinWaitActive("Basic Setup - Mozilla Firefox","") MouseMove(1126,283) MouseDown("left") MouseUp("left") WinWait("Gateway Status - Mozilla Firefox","") If Not WinActive("Gateway Status - Mozilla Firefox","") Then WinActivate("Gateway Status - Mozilla Firefox","") WinWaitActive("Gateway Status - Mozilla Firefox","") MouseMove(483,691) MouseDown("left") MouseUp("left") MouseMove(582,690) MouseDown("left") MouseUp("left") #endregion --- ScriptWriter generated code End --- EndFunc Func Button1Click() $start = 1 EndFunc Func Form1Close() Exit EndFunc Func Form1Maximize() EndFunc Func Form1Minimize() EndFunc Func Form1Restore() EndFunc Func Label1Click() EndFunc Func ModemIpChange() EndFunc Func PassChange() EndFunc Func UserNameChange() EndFunc Script is this... i am trying to work with this.. and wanna do this without ie functions.. There is no Cloud no more i hop
BrettF Posted August 1, 2008 Posted August 1, 2008 Why without the IE functions? It makes it easier, cleaner, faster, compatible with most other machines..... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
AdmiralAlkex Posted August 1, 2008 Posted August 1, 2008 I just wanted to say that I agree with BrettF and so does most people on this forum. (about all except Elishac ) Using IE is considered the best when automating browsing the internet and such stuff. Note that there is a FF.au3 but it's actually far harder to use and can never get as good as the IE functions. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
continyu Posted August 2, 2008 Author Posted August 2, 2008 OK. you are right. but when i am using ie functions.. i am still have sam problem.. its cant read modems ip from Guictrlcreatebox..
AdmiralAlkex Posted August 2, 2008 Posted August 2, 2008 OK. you are right. but when i am using ie functions.. i am still have sam problem.. its cant read modems ip from Guictrlcreatebox..Guictrlcreatebox?? I have never seen that before .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
BrettF Posted August 2, 2008 Posted August 2, 2008 Hi. Could you just start from the beginning- what do you want to achieve? What program/website? Those sort of questions. Then we can best help you Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now