Jump to content

Centurion_D

Active Members
  • Posts

    31
  • Joined

  • Last visited

About Centurion_D

  • Birthday 11/21/1988

Profile Information

  • WWW
    http://doublexlegion.gwgaming.net/

Centurion_D's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. looks like you're defining the variable as an integer and not an array... $PlainSize = _ImageGetSizeJPG( $plainpic ) $OpenSize = _ImageGetSizeJPG( $openpic ) $InvSize = _ImageGetSizeJPG( $invpic ) are integers and you're trying to use them as arrays...
  2. for some reason i took out that extended style...wish i hadn't now. as for the rest, the minimize thing i didnt realize and i thank you for that, and the one line if endif statements are just my style... thanks a bunch!!! but now it only displays one file at a time...i kinda need many file paths to be displayed...
  3. I got the drag and drop working but I have no idea on how to make the file path show up once I drag and drop it. I'm not nearly done so bear with me... ; First build - finish GUI #include <GUIConstants.au3> GUICreate("QuikInstall 2005 (Build 620 - Beta)",400,270) $list = GUICtrlCreateEdit("Drag and Drop Files Here",5,5,350,210,-1,$WS_EX_ACCEPTFILES) GUICtrlSetState($list,$GUI_ACCEPTFILES) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $gui_event_close Then Exit EndIf If $msg = $gui_event_minimize Then WinSetState("QuikInstall 2005 (Build 620 - Beta)",@SW_MINIMIZE) EndIf WEnd
  4. no, still crashes and i wish i new why... i'll take out the gui crap and leave the needed parts and see if that works...
  5. i did indent but it doesnt show when i copy it and im too lazy to indent manually...and yes, the script itself would run fine, but the copiled exe didnt.. i renamed it to a.exe and abcd.exe and it works... yea i was writing this last night at 2 am so forgive me for that... but wouldnt the compiler pick that up? it should... and the notifications are just there for now...no other reason. im making this for my friend so i was in a hurry...his internet always goes down and he wanted a program that could ping some address and report an error if there was one (i could have made this faster which i might for his release, no configuring setup crap and all...just the check function) sorry for being such a newb but im still working on like three other projects...im not usually that careless. thanks for your help and i'll see what you did... i'll report the results in a few.....
  6. What in the world happened? All the other scripts work, but not this one... I have no idea why but it continues to happen unless the filename is renamed to something like "abcd.exe". thats the only way it works and i'm kinda pissed that it does this... the code's down below so feel free to tell me what i did wrong and if anyone could compile it and see if they get the same result... im thinking file corruption and i've already tried reinstalling autoit v3... Connection_Guardian.au3
  7. What in the world happened? All the other scripts work, but not this one... I have no idea why but it continues to happen unless the filename is renamed to something like "abcd.exe". thats the only way it works and i'm kinda pissed that it does this... the code's down below so feel free to tell me what i did wrong and if anyone could compile it and see if they get the same result... im thinking file corruption and i've already reinstalled autoit v3... global $notify If FileExists("Preferences01.ini") = 0 Then setup() Else test() EndIf Func setup() #include <GUIConstants.au3> GUICreate("Connection Guardian v1.0 Setup",300,200) $checkfor = GUICtrlCreateInput("Ip address or website",5,5,150) $time = GUICtrlCreateCombo("Interval Time",5,30,150) GUICtrlSetData($time,"1 Minute|5 Minutes|10 Minutes|15 Minutes|30 Minutes|1 Hour|2 Hours") $set = GUICtrlCreateButton("Set And Start",215,165,80) $notify = GUICtrlCreateCombo("Type of notification",5,60,150) GUICtrlSetData($notify,"Ballon Tip|Msg Box|Tool Tip (by mouse pointer)|Tray Icon") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $gui_event_close Then Exit EndIf If $msg = $gui_event_minimize Then ;winsetstate() EndIf If $msg = $set Then $address = GUICtrlRead($checkfor) $time = GUICtrlRead($time) $notify = GUICtrlRead($notify) If $address = "Ip address or website" Then MsgBox(0,"Error!","Please insert an IP address that is not your own or a website like www.google.com") GUIDelete() setup() ElseIf $time = "Interval Time" Then MsgBox(0,"Error!","Please Select an interval period") GUIDelete() setup() ElseIf $notify = "Type of notification" Then MsgBox(0,"Error!","Select a type of notification!") GUIDelete() setup() Else IniWrite("Preferences01.ini","Settings","Address",$address) IniWrite("Preferences01.ini","Settings","Interval",$time) IniWrite("Preferences01.ini","Settings","Notfiy",$notify) test() EndIf EndIf WEnd EndFunc Func test() $address = IniRead("Preferences01.ini","Settings","Address","www.google.com") $time = IniRead("Preferences01.ini","Settings","Interval","15 Minutes") $notify = IniRead("Preferences01.ini","Settings","Notify","Ballon Tip") If $time = "1 Minute" Then $time = 60000 ElseIf $time = "5 Minutes" Then $time = 60000 * 5 ElseIf $time = "10 Minutes" Then $time = 600000 ElseIf $time = "15 Minutes" Then $time = 15000 * 60 ElseIf $time = "30 Minutes" Then $time = 30000 * 60 ElseIf $time = "1 Hour" Then $time = 3600000 ElseIf $time = "2 Hours" Then $time = 120 * 60000 EndIf While 1 Ping($address) If @error > 0 Then If $notify = "Ballon Tip" Then TrayTip("Network Error Detected!","Your internet connection may have been lost. This may also be due to server issues. To check this, google and yahoo will both be tested.",30,3) test2() ElseIf $notify = "Msg Box" Then MsgBox(0,"Network Error Detected!","Your internet connection may have been lost. This may also be due to server issues. To check this, google will be tested. A confirmation box will appear showing the results.") test2() ElseIf $notify = "Tool Tip (by mouse pointer)" Then ToolTip("Network Error Detected! Checking Validity...you will see a confirmation box that will show the results.") test2() ElseIf $notify = "Tray Icon" Then ;work on this EndIf EndIf Sleep($time) WEnd EndFunc Func test2() Ping("www.google.com") If @error > 0 Then If $notify = "Ballon Tip" Then TrayTip("Validity Check Concluded...","Your network connection has been lost...",30,3) test() ElseIf $notify = "Msg Box" Then MsgBox(0,"Validity Check Concluded...","Your network connection has been lost...") test() ElseIf $notify = "Tool Tip (by mouse pointer)" Then ToolTip("Validity Check Concluded...","Your network connection has been lost...") test() ElseIf $notify = "Tray Icon" Then ;work on this EndIf Else If $notify = "Ballon Tip" Then TrayTip("Validity Check Concluded...","Your network connection has NOT been lost. The error must have been due to server issues.",30,3) test() ElseIf $notify = "Msg Box" Then MsgBox(0,"Validity Check Concluded...","Your network connection has NOT been lost. The error must have been due to server issues.") test() ElseIf $notify = "Tool Tip (by mouse pointer)" Then ToolTip("Validity Check Concluded...","Your network connection has NOT been lost. The error must have been due to server issues.") test() ElseIf $notify = "Tray Icon" Then ;work on this EndIf EndIf EndFunc
  8. ok nvm i got it... ; build 524 - error handling (add elses after endifs) ; build 524 - scrolling (no work) global $from global $choose global $input global $start global $about global $progress global $label global $output global $exit #include <GUIConstants.au3> main() Func main() guicreate("DNA<->RNA Converter 2005 (build 523)",410,250) $input = guictrlcreateedit("Sequence to Convert",5,5,310,200,$ES_AUTOVSCROLL) $from = guictrlcreatecombo("Convert from",320,5,85) $choose = guictrlcreatecombo("Convert to",320,30,85) $start = guictrlcreatebutton("Start",320,75,85) $about = guictrlcreatebutton("About",320,110,85) $exit = guictrlcreatebutton("Exit", 320,180,85) $progress = guictrlcreateprogress(5,210,310,35) $options = guictrlcreatebutton("Options",320,145,85) guictrlcreatelabel("Percent Complete: ",320,215) $label = guictrlcreatelabel("0",320,230) guictrlsetdata($choose,"DNA 5' to 3'|DNA 3' to 5'|RNA") guictrlsetdata($from,"DNA 5' to 3'|DNA 3' to 5'|RNA") guisetstate() While 1 $msg = guigetmsg() If $msg = $gui_event_close or $msg = $exit then exit endif If $msg = $gui_event_minimize then Winsetstate("DNA<->RNA Converter 2005(build 523)","",@SW_MINIMIZE) endif If $msg = $about then MsgBox(0,"About DNA<->RNA Converter 2005 (build 523)","Written by: Centurion_D" & @CRLF & "Dedicated to Jared Rashford - For teaching me many new things, such as this." & @CRLF & @CRLF & "Well... no one has really done this...and I'd like to get into more math-based programs, like this one." & @CRLF & @CRLF & "Thanks again Mr. Rashford! Spread this program to other scientists, teachers, etc. who may find this useful." & @CRLF & @CRLF & "Any bugs found or feature requests can be emailed to me at epsilon045@yahoo.com (or @gmail.com).") endif If $msg = $start then if guictrlread($choose) = "Convert to" or guictrlread($from) = "Convert from" then MsgBox(0,"Error!","You must choose whether to convert to DNA or RNA!") guidelete() main() else if $choose = $from then MsgBox(0,"Error! - Both options cannot be the same!","You need to change either where you're encoding from or where you're converting to.") guidelete() main() else $input = guictrlread($input) convert() endif endif endif Wend Endfunc Func convert() $choose = guictrlread($choose) $from = guictrlread($from) $input = stringupper($input) $output = "" $percent = 0 If $choose = "RNA" then if $from = "DNA 5' to 3'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "T" then $output = $output & "U" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 3' to 5'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "U" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif If $choose = "DNA 5' to 3'" then if $from = "RNA" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "U" then $output = $output & "T" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 3' to 5'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif if $choose = "DNA 3' to 5'" then if $from = "RNA" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "U" then $output = $output & "A" elseif stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 5' to 3'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif Endfunc Func view() guidelete() guicreate("DNA <-> RNA Converter Viewer 2005 (build 518)",410,250) $view = guictrlcreateedit($output,5,5,310,200,$ES_MULTILINE) $new = guictrlcreatebutton("New Session",5,210,90) $save = guictrlcreatebutton("Save Conversion",100,210,90) $options = guictrlcreatebutton("Options",195,210,90) $exit = guictrlcreatebutton("Exit",290,210,90) guictrlsetdata($view,$output) guisetstate() While 1 $msg = guigetmsg() If $msg = $new then main() endif If $msg = $save then fileopen("Conversion Logs.txt",2) filewriteline(@mon & " " & @day & " " & @year) filewriteline($input) filewriteline($output) fileclose("Conversion Logs.txt") endif If $msg = $options then options() endif If $msg = $gui_event_close or $msg = $exit then exit endif If $msg = $gui_event_minimize then Winsetstate("DNA<->RNA Converter 2005(build 518)","",@SW_MINIMIZE) endif Wend Endfunc func options() Endfunc
  9. yes i know, but when i force the multi-line style the scroll disappears...now i let it be default and the edit box becomes single-line and the scroll bar reappears...
  10. well, ok... without the styles, the scroll comes up but i'd like it to also make a multilined editbox that still scrolls... any ideas?
  11. it doesnt work, it stops me at the bottom of the box
  12. dont worry about it the dna part, i just need to type a lot of text and the edit box will not let me make a scroll bar... to test it: use any combinations of A's, T's, G's, and C's for DNA A's, U's, G's, and C's for RNA then you can convert it! whoo...more for scientific use
  13. ok....shoot i forgot to change that back one sec... ; build 518 - error handling (add elses after endifs) ; build 518, 519, or 520 - scrolling (no work) global $from global $choose global $input global $start global $about global $progress global $label global $output global $exit #include <GUIConstants.au3> main() Func main() guicreate("DNA<->RNA Converter 2005 (build 518)",410,250) $input = guictrlcreateedit("Sequence to Convert",5,5,310,200,$ES_MULTILINE) $from = guictrlcreatecombo("Convert from",320,5,85) $choose = guictrlcreatecombo("Convert to",320,30,85) $start = guictrlcreatebutton("Start",320,75,85) $about = guictrlcreatebutton("About",320,110,85) $exit = guictrlcreatebutton("Exit", 320,180,85) $progress = guictrlcreateprogress(5,210,310,35) $options = guictrlcreatebutton("Options",320,145,85) guictrlcreatelabel("Percent Complete: ",320,215) $label = guictrlcreatelabel("0",320,230) guictrlsetdata($choose,"DNA 5' to 3'|DNA 3' to 5'|RNA") guictrlsetdata($from,"DNA 5' to 3'|DNA 3' to 5'|RNA") guisetstate() While 1 $msg = guigetmsg() If $msg = $gui_event_close or $msg = $exit then exit endif If $msg = $gui_event_minimize then Winsetstate("DNA<->RNA Converter 2005(build 518)","",@SW_MINIMIZE) endif If $msg = $about then MsgBox(0,"About DNA<->RNA Converter 2005 (build 518)","Written by: Centurion_D" & @CRLF & "Dedicated to Jared Rashford - For teaching me many new things, such as this." & @CRLF & @CRLF & "Well... no one has really done this...and I'd like to get into more math-based programs, like this one." & @CRLF & @CRLF & "Thanks again Mr. Rashford! Spread this program to other scientists, teachers, etc. who may find this useful." & @CRLF & @CRLF & "Any bugs found or feature requests can be emailed to me at epsilon045@yahoo.com (or @gmail.com).") endif If $msg = $start then if guictrlread($choose) = "Convert to" or guictrlread($from) = "Convert from" then MsgBox(0,"Error!","You must choose whether to convert to DNA or RNA!") guidelete() main() else if $choose = $from then MsgBox(0,"Error! - Both options cannot be the same!","You need to change either where you're encoding from or where you're converting to.") guidelete() main() else $input = guictrlread($input) convert() endif endif endif Wend Endfunc Func convert() $choose = guictrlread($choose) $from = guictrlread($from) $input = stringupper($input) $output = "" $percent = 0 If $choose = "RNA" then if $from = "DNA 5' to 3'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "T" then $output = $output & "U" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 3' to 5'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "U" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif If $choose = "DNA 5' to 3'" then if $from = "RNA" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "U" then $output = $output & "T" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 3' to 5'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif if $choose = "DNA 3' to 5'" then if $from = "RNA" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "U" then $output = $output & "A" elseif stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" else $output = $output & stringmid($input,$a,1) endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif if $from = "DNA 5' to 3'" then for $a = 1 to stringlen($input) if stringmid($input,$a,1) = "A" then $output = $output & "T" elseif stringmid($input,$a,1) = "T" then $output = $output & "A" elseif stringmid($input,$a,1) = "C" then $output = $output & "G" elseif stringmid($input,$a,1) = "G" then $output = $output & "C" endif $percent = $percent + 100/stringlen($input) guictrlsetdata($progress,$percent) guictrlsetdata($label,$percent) next view() endif endif Endfunc Func view() guidelete() guicreate("DNA <-> RNA Converter Viewer 2005 (build 518)",410,250) $view = guictrlcreateedit($output,5,5,310,200,$ES_MULTILINE) $new = guictrlcreatebutton("New Session",5,210,90) $save = guictrlcreatebutton("Save Conversion",100,210,90) $options = guictrlcreatebutton("Options",195,210,90) $exit = guictrlcreatebutton("Exit",290,210,90) guictrlsetdata($view,$output) guisetstate() While 1 $msg = guigetmsg() If $msg = $new then main() endif If $msg = $save then fileopen("Conversion Logs.txt",2) filewriteline(@mon & " " & @day & " " & @year) filewriteline($input) filewriteline($output) fileclose("Conversion Logs.txt") endif If $msg = $options then options() endif If $msg = $gui_event_close or $msg = $exit then exit endif If $msg = $gui_event_minimize then Winsetstate("DNA<->RNA Converter 2005(build 518)","",@SW_MINIMIZE) endif Wend Endfunc func options() Endfunc
×
×
  • Create New...