Sign in to follow this  
Followers 0
walle

Function restarts by itself?

7 posts in this topic

When the progression, rss() and start() finished the

functions restarts, in a infinite loop, starting

with Rss() and then start() again.. Anyone got a clue why?

Case $MSG = $Start
    RSS()
    START()oÝ÷ Ø[§rبjëh×6Func RSS()
    RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\MagicISO", "RegSerialKey")
    If @Error = 1 Then
    msgbox(0,"","Felaktig Registrering av Magiciso")
    Exit
    EndIf   
    GUISetState(@SW_SHOW, $Form1)
    $READRSS = _GUICtrlListBox_GetText($LISTBOX2, 0)
    $URL = "http://www.swedvdr.org/browse.php" 
    $OIE = _IECREATE($URL, 0, 0)
    $OFORM = _IEFORMGETCOLLECTION($OIE, 0)
    _IELOADWAIT($OIE)
    $OSEARCHINPUT = _IEGETOBJBYNAME($OIE, "Search")
    _IEFORMELEMENTSETVALUE($OSEARCHINPUT, $READRSS)
    _IEFORMSUBMIT($OFORM)
    _IELOADWAIT($OIE)
    $COLLINKS = _IELINKGETCOLLECTION($OIE)
    _GUICtrlListBox_AddString($LIST1, "Laddar ner: " & $READRSS & ".torrent")
    $SURL = ""
    For $OLINK In $COLLINKS
        $SURL = $OLINK.href
        If StringInStr($SURL, "download.php?") Then ExitLoop
    Next
    If $SURL <> "" Then
        $TORRENTSAVE = (@TempDir & "\download.torrent")
        InetGet($SURL, $TORRENTSAVE)
        RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Burnbuddy", "URL", "REG_SZ", $SURL)
        _GUICtrlListBox_AddString($LIST1, "Executar Utorrent")
        Run($RUTORRENT & ' ' &"/DIRECTORY " & '"' & $RIMG & "\" & $READRSS & '"' & ' ' & $TORRENTSAVE, "", @SW_MAXIMIZE)
        GUICtrlSetData($PROGRESS, 0)
    Else
        MsgBox(16, "Error", "No '.torrent' links found.")
        _GUICtrlListBox_AddString($LIST1, "Error, Ingen .torrent funnen")
    EndIf
    _IEQUIT($OIE)
    _GUICtrlListBox_AddString($LIST1, "Lägger till " & $READRSS & ".torrent")
EndFuncoÝ÷ Ø[§rب+Zµ«­¢+ÙÕ¹MQIP ¤(%}U%
Ñɱ1¥ÍÑ   ½á}MÑÉ¥¹ ÀÌØí1%MPÄ°ÅÕ½Ðí3ÍÈ¥¸¥¹½ÉµÑ¥½¸ÅÕ½Ðì¤(%U%
ÑɱMÑÑ ÀÌØíAI=IML°ÄÀ¤(%¥±±Ñ ÀÌØí5A@¤(%}U%
Ñɱ1¥ÍÑ   ½á}MÑÉ¥¹ ÀÌØí1%MPÄ°ÅÕ½ÐíUѽÉɹЭ½¹¥ÕÉÉÌÅÕ½Ðì¤($ÀÌØíIIMLô}U%
Ñɱ1¥ÍÑ   ½á}ÑQáÐ ÀÌØí1%MQ   =`È°À¤(%]¥¹MÑQ¥Ñ± ÅÕ½Ðí  ÕɹÕäÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí  ÕɹÕä´ÅÕ½ÐìµÀìÀÌØíIIML¤(%U%
ÑɱMÑÑ ÀÌØíAI=IML°ÈÀ¤(%}U%
Ñɱ1¥ÍÑ   ½á}MÑÉ¥¹ ÀÌØí1%MPÄ°ÅÕ½Ðí5½¹¥Ñ½ÉÉÈUѽÉɹÐÅÕ½Ðì¤(%%µ ¤(ÀÌØí%µA¥ô¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈí¥µ¹©ÁÅÕ½Ðì¤)U%
ÑɱMÑ%µ ÀÌØíA%Ä°ÀÌØí%µA¥¤)¥±±Ñ¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈí¥µ¹©ÁÅÕ½Ðì¤()]¥¹]¥Ð ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì¤)]¥¹MÑMÑÑ ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì±M]}M!=]9=I50¤)¼($(ÀÌØíÑ]MPô]¥¹ÑMÑÑ ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì¤)%ÀÌØíÑ]MPô    ¥Ñ9 ÈÄ°È̤Q¡¸(%]¥¹MÑMÑÑ ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì±M]}M!=]9=I50¤(%]¥¹MÑMÑÑ ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì±M]}!%¤)¹%($(ÀÌØíѥѱôÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì(ÀÌØí±¥Íѽ¹Ñɽ°ôÅÕ½Ðím
1MM98éMåÍ1¥ÍÑY¥ÜÌÈÅtÅÕ½Ðì((ÀÌØí¡]¹ô
½¹Ñɽ±Ñ!¹± ÀÌØíѥѱ°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí±¥Íѽ¹Ñɽ°¤(ÀÌØí¡É}¡]¹ô}U%
Ñɱ1¥ÍÑY¥Ý}Ñ!È ÀÌØí¡]¹¤(((ÀÌØí¥¹Q8ô}U%
Ñɱ1¥ÍÑY¥Ý}¥¹%¹QáÐ ÀÌØí!]9°ÀÌØíIIML¤(ÀÌØíQMPô}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí!]9°ÀÌØí¥¹Q8¤(ÀÌØí½Õ¹Ðô
½¹Ñɽ±1¥ÍÑY¥Ü ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì°ÅÕ½ÐíÑMÕ%ѵ
½Õ¹ÐÅÕ½Ðì¤(ÀÌØí¥½Õ¹Ðô
½¹Ñɽ±1¥ÍÑY¥Ü ÅÕ½ÐímIaAQ%Q1éQ½ÉɹиÀäÈí¬¸¨ÀÌØítÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíMåÍ1¥ÍÑY¥ÜÌÈÄÅÕ½Ðì°ÅÕ½ÐíÑ%ѵ
½Õ¹ÐÅÕ½Ðì¤(()¥´ÀÌØí±¥ÍÑÉÉålÀÌØí½Õ¹ÑulÀÌØí¥½Õ¹Ð¬Åt)½ÈÀÌØíôÀQ¼ÀÌØí½Õ¹Ð´Ä(ÀÌØí±¥ÍÑÉÉålÀÌØíulÁtô}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí¡É}¡]¹°ÀÌØí¤(ÀÌØí
½Õ¹Ñµ½ÉôÀÌØí¥½Õ¹Ð´ÀÌØí¥¹Q8(½ÈÀÌØí¤ôÀÌØí¥¹Q8Q¼ÀÌØí¥½Õ¹Ð´ÀÌØí
½Õ¹Ñµ½É(ÀÌØí¥ÑµÑáÐô}U%
Ñɱ1¥ÍÑY¥Ý}Ñ%ѵQáÐ ÀÌØí¡]¹°ÀÌØí¤°ÀÌØí¤(ÀÌØí±¥ÍÑÉÉålÀÌØíulÀÌØí¤¬ÅtôÀÌØí¥ÑµÑáÐ(9áÐ)9áÐ)½ÈÀÌØíôÀQ¼ÀÌØí½Õ¹Ð´Ä(í
½¹Í½±]É¥Ñ ÀÌØí±¥ÍÑÉÉålÀÌØíulÁt¤(½ÈÀÌØí¤ôÀQ¼ÀÌØí¥½Õ¹Ð´Ä(í
½¹Í½±]É¥Ñ ÀÌØí±¥ÍÑÉÉålÀÌØíulÀÌØí¤¬Åt¤(9áÐ(í
½¹Í½±]É¥Ñ ÅÕ½ÐíðÅÕ½Ðì¤)9áÐ((()½ÈÀÌØíôÀQ¼ÀÌØí½Õ¹Ð´Ä(ÀÌØíѵÀôÌäìÌäì(½ÈÀÌØí¤ôÀQ¼ÀÌØí¥½Õ¹Ð´Ä(ÀÌØíѵÀµÀìôÀÌØí±¥ÍÑÉÉålÀÌØíulÀÌØí¤¬Åt(9áÐ(MÝ¥Ñ ÀÌØí($%
ÍÐ($$%U%
ÑɱMÑÑ ÀÌØíQ=II9P°ÅÕ½ÐíMÑÑÕÌèÅÕ½ÐìµÀìÌäìÌäìµÀìÀÌØí±¥ÍÑÉÉålÀÌØíulÁtµÀìÀÌØíѵÀ¤($%
ÍÌ(U%
ÑɱMÑÑ ÀÌØí1   0аÅÕ½Ðí-±ÉÐèÅÕ½ÐìµÀìÌäìÌäìµÀìÀÌØí±¥ÍÑÉÉålÀÌØíulÁtµÀìÀÌØíѵÀ¤(
ÍÔ(U%
ÑɱMÑÑ ÀÌØí1   0Ä°ÅÕ½Ðí/±±½ÈèÅÕ½ÐìµÀìÌäìÌäìµÀìÀÌØí±¥ÍÑÉÉålÀÌØíulÁtµÀìÀÌØíѵÀ¤(
ÍØ(U%
ÑɱMÑÑ ÀÌØí1   0Ô°ÅÕ½Ðí-±¥¹ÑÈèÅÕ½ÐìµÀìÌäìÌäìµÀìÀÌØí±¥ÍÑÉÉålÀÌØíulÁtµÀìÀÌØíѵÀ¤(
ÍÜ(U%
ÑɱMÑÑ ÀÌØí1   0ÄÄ°ÅÕ½Ðí9°µ!ÍÑ¥¡ÐèÅÕ½ÐìµÀìÌäìÌäìµÀìÀÌØí±¥ÍÑÉÉålÀÌØíulÁtµÀìÀÌØíѵÀ¤(¹MÝ¥Ñ )9áÐ((ÀÌØíIMLôU%
ÑɱI ÀÌØí1   0Ф(ÀÌØí5MôMÑÉ¥¹QÉ¥µ1Ð ÀÌØíIML°Ü¤)ͱÀ ÄÀÀÀ¤)U¹Ñ¥°ÀÌØí5MôÅÕ½ÐìÄÀÀ¸ÀÅÕ½Ðì((()U%
ÑɱMÑÑ ÀÌØíAI=IML°ÈÀ¤($ÀÌØí%11%MPô}%11%MQQ=IId ÀÌØíI%5µÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíIIML¤($(%%ÉɽÈôÄQ¡¸($%5Í  ½à À°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½Ðí9¼¥±ÌÀäÈí½±É̽չ¸ÅÕ½Ðì¤($%á¥Ð(%¹%(%½ÈÀÌØí$ôÀQ¼ÀÌØí%11%MPlÄÁt(%9áÐ($ÀÌØíII%195ôMÑÉ¥¹QÉ¥µI¥¡Ð ÀÌØí%11%MPlÄÁt°Ð¤(%}U%
Ñɱ1¥ÍÑ   ½á}MÑÉ¥¹ ÀÌØí1%MPÄ°ÅÕ½ÐíA­È¥¡½ÀèÅÕ½ÐìµÀìÀÌØíII%195¤($($($((1½°ÀÌØí¥A%ôIÕ¸¡MÉ¥ÁѥȵÀìÌäìÀäÈíÉȹáàÅÕ½ÐìÌäìµÀìÀÌØíI%5µÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíIIMLµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíII%195µÀìÌäì¹ÉÈÅÕ½ÐìÌäìµÀìÀÌØí5A@°ÅÕ½ÐìÅÕ½Ðì°M]}!%°Ð¬È¤(1½°ÀÌØíÍMÑ=ÕÑIôÅÕ½ÐìÅÕ½Ðì((]¡¥±AɽÍÍá¥ÍÑÌ ÀÌØí¥A%¤($$ÀÌØíÍMÑ=ÕÑIµÀìôMѽÕÑI ÀÌØí¥A%¤($$ÀÌØíMÁ±¥ÐôMÑÉ¥¹MÁ±¥Ð ÀÌØíÍMÑ=ÕÑI±
I1¤($%½ÈÀÌØí¤ôÄÄѼÀÌØíMÁ±¥ÑlÁt(%ÀÌØíMÁ±¥ÑlÀÌØí¥tQ¡¸($%U%
ÑɱMÑÑ ÀÌØíA½ÁÕÁ±¥ÍаÀÌØíMÁ±¥ÑlÀÌØí¥t¤($%¹%(%9áÐ(%ͱÀ ÈÀÀÀ¤(%]¹(((%1½°ÀÌØí¥A%ôIÕ¸¡MÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÅÕ½ÐíÕ¹ÉȹáÅÕ½ÐìµÀìÅÕ½ÐìÙÅÕ½ÐìµÀìÌäìÅÕ½ÐìÌäìµÀìÀÌØíI%5µÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíIIMLµÀìÅÕ½ÐìÀäÈìÅÕ½ÐìµÀìÀÌØíII%195µÀìÌäì¹ÉÈÅÕ½ÐìÌäì°ÅÕ½ÐìÅÕ½Ðì°M]}!%°Ð¬È¤(%1½°ÀÌØíÍMÑ=ÕÑIôÅÕ½ÐìÅÕ½Ðì((]¡¥±AɽÍÍá¥ÍÑÌ ÀÌØí¥A%¤($$ÀÌØíÍMÑ=ÕÑIµÀìôMѽÕÑI ÀÌØí¥A%¤($%ͱÀ ÔÀÀ¤($$íU%
ÑɱMÑÑ ÀÌØí1%MPÄ°ÀÌØíÍMÑ=ÕÑI¤(%]¹($($($ÀÌØíIMU1PôMÑÉ¥¹QÉ¥µI¥¡Ð ÀÌØíÍMÑ=ÕÑI°È¤(%U%
ÑɱMÑÑ ÀÌØíAI=IML°ØÀ¤(%}U%
Ñɱ1¥ÍÑ   ½á}MÑÉ¥¹ ÀÌØí1%MPÄ°ÅÕ½Ðí   ˹¹ÈèÅÕ½ÐìµÀìÀÌØíIMU1P¤(%U%
ÑɱMÑÑ ÀÌØíAI=IML°àÀ¤($ÀÌØíI   UI9HôII ÅÕ½Ðí!-e}1=
1}5
!%9ÀäÈíM=Q]IÀäÈí    ÕɹÕäÅÕ½Ðì°ÅÕ½Ðí    ˹¹ÉÅÕ½Ðì¤(%ͱÀ ÈÀÀ¤(%U%
ÑɱMÑÑ ÀÌØíA½ÁÕÁ±¥ÍаÅÕ½ÐìÅÕ½Ðì¤((($(%1½°ÀÌØí¥A%ôIÕ¸ ÌäìÅÕ½ÐìÌäìµÀìMÉ¥ÁѥȵÀìÌäìÀäÈíµ¥Í¼¹áÅÕ½ÐìÅÕ½ÐìÌäìµÀìÀÌØí5A@µÀìÀÌØíIMU1PµÀìÌäìÅÕ½ÐìµÌäìµÀìÀÌØíI    UI9H°ÅÕ½ÐìÅÕ½Ðì±M]}!%°Ð¬È¤(1½°ÀÌØíÍMÑ=ÕÑIôÅÕ½ÐìÅÕ½Ðì(($(]¡¥±AɽÍÍá¥ÍÑÌ ÀÌØí¥A%¤($$ÀÌØíÍMÑ=ÕÑIµÀìôMѽÕÑI ÀÌØí¥A%¤($$ÀÌØíMÁ±¥ÐôMÑÉ¥¹MÁ±¥Ð ÀÌØíÍMÑ=ÕÑI±
I1¤($%½ÈÀÌØí¤ôÄäѼÀÌØíMÁ±¥ÑlÁt(%ÀÌØíMÁ±¥ÑlÀÌØí¥tQ¡¸($%U%
ÑɱMÑÑ ÀÌØíA½ÁÕÁ±¥ÍаÀÌØíMÁ±¥ÑlÀÌØí¥t¤($%¹%(%9áÐ(%ͱÀ ÈÀÀÀ¤(%]¹($($($($($)U%
ÑɱMÑÑ ÀÌØíAI=IML°ÄÀÀ¤)M½Õ¹A±ä¡]¥¹½ÝͥȵÀìÅÕ½ÐìÀäÈíµ¥ÀäÈíѹÝØÅÕ½Ðì°Ä¤)¥±±Ñ¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈí¥µ¹©ÁÅÕ½Ðì¤)¥±±Ñ¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈíѵÁѽÉɹйÑáÐÅÕ½Ðì¤)¥±±Ñ¡QµÁ¥ÈµÀìÅÕ½ÐìÀäÈí½Ý¹±½¹Ñ½ÉɹÐÅÕ½Ðì¤)¹Õ¹

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Are the functions in a while loop?

Edited by Aassdd

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Are the functions in a while loop?

Well, maybe this causing the problem. Not sure

All other buttons with a function connected run

only once.

While 1
    $MSG = GUIGetMsg()
        Sleep(10)
            Switch $MSG
        Case $GUI_EVENT_CLOSE
        Close()
            EndSwitch
Select
Case $MSG = $Start
    RSS()
    START()
...........
Endselect
Edited by walle

Share this post


Link to post
Share on other sites

Why do you have both switch and select? Maybe you used Koda and confused you?

While 1
    $MSG = GUIGetMsg()
    Sleep(10)
    Switch $MSG
        Case $GUI_EVENT_CLOSE
            Close()
        Case $Start
            RSS()
            START()
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

One can only guess what $Start is... a handle perhaps or something else? And consider removing the Sleep(10) in the message loop as it will affect a healthy response of GuiGetMsg().

:)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

One can only guess what $Start is... a handle perhaps or something else? And consider removing the Sleep(10) in the message loop as it will affect a healthy response of GuiGetMsg().

:)

Thanks Mhz, oft: is it possible to manage the gui

while the functions is in progress.

Geo... suggested timers, do u have

any other approach?

Edited by walle

Share this post


Link to post
Share on other sites

Thanks Mhz, oft: is it possible to manage the gui

while the functions is in progress.

Geo... suggested timers, do u have

any other approach?

You can use AdLib or timers but you are sharing time between the functions and your Gui so I would expect a Gui with response issues. I have not played yet with the UDF based timers in AutoIt so perhaps they may work differently to my perception. And since multithreading is not available in AutoIt, then I would look into multiple processes to do multiple tasks. If you would like some UDFs designed for creating/handling multiple processes then search the forum for multithreading and the likes in the examples forum.

Share this post


Link to post
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
Sign in to follow this  
Followers 0