Jump to content

AceSentinal

Members
  • Posts

    14
  • Joined

  • Last visited

About AceSentinal

  • Birthday 06/12/1986

AceSentinal's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. i didn't get the copy to clipboard function to work, but i got the data to load to the program onclick "Generate". i simply didn't realize that part till i was rushing through links. I haven't started on the copy to clipboard yet as the program i built was just a simple fix to the find and replace with notepad.
  2. wow... never mind, figured it out... where's the delete button?
  3. I am looking for clipboard management commands for onclick. I want the Link edit box to clear and paste from clipboard on click and the view edit box to copy to clipboard on click. I just can't seem to have the program preform the actions. Here is what I have: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <Clipboard.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 137, 192, 124) $FitName = GUICtrlCreateEdit("Fit Name", 253, 40, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL)) $View = GUICtrlCreateEdit("", 8, 8, 601, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL)) $Link = GUICtrlCreateEdit("Link", 253, 72, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL)) $Generate = GUICtrlCreateButton("Generate", 276, 104, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Link GUICtrlSetData($Link,"") GUICtrlSetData($Link, _ClipBoard_GetData()) Case $View _ClipBoard_SetData($View) Case $Generate $str = StringReplace(GUICtrlRead($Link), "fitting:", "<a onclick=" & Chr(34) & "CCPEVE.showFitting('") & "')" & Chr(34) & ">" & GUICtrlRead($FitName) & "</a>" GUICtrlSetData($View, $str) EndSwitch WEnd *edit Should be easier to read with the color codes in now.
  4. Who do we talk to to see these search scripts get a sticky? Impressive work.
  5. I am looking for a method to select folders and files alike for a File list compilation with the *.dec extension. Here is what I have, I'm pretty sure my problem is with "FileOpenDialog" however I don't know what to put in it's place. Case $Compile $var=FileOpenDialog("Hold down Ctrl or Shift to choose multiple files.","Decks\","Apprentice Decks (*.dec)",1+4);Allows selection of files, Stored to string $var. If @error Then MsgBox(4096,"","No File(s) chosen");Message box when cancel is clicked. Exit Else $var=StringReplace($var,"|",@CRLF);String->Array function MsgBox(4096,"Files","You chose " & $var);String->Array Display EndIf $attrib = FileGetAttrib($var) If @error Then MsgBox(4096,"Error", "Could not obtain attributes.") Exit Else If StringInStr($attrib, "D") Then;Checks if file selected is a folder.(Auto search function) FileChangeDir($var) $search=FileFindFirstFile("*.dec"); Catches the first file in search. $Dir=stringreplace(@WorkingDir,@ScriptDir,"");gets local folder directory if in same folder as working script, or gets full path of deck While 1 $file=FileFindNextFile($search);Search for subsequent files If @error Then ExitLoop;end loop when no more files are found $file=StringReplace($file,".dec","");remove .dec extension IniWrite("result.ini","Custom Deck",$file,$Dir);writes list to ini with the local folder name shortcut. WEnd EndIf EndIf If StringInStr($attrib, "N") Then;Checks if file selected is a normal file.(Auto search function) $search=FileFindFirstFile("*.dec"); Catches the first file in search. $Dir=stringreplace(@WorkingDir,@ScriptDir,"");gets local folder directory if in same folder as working script, or gets full path of deck While 1 $file=FileFindNextFile($search);Search for subsequent files If @error Then ExitLoop;end loop when no more files are found $file=StringReplace($file,".dec","");remove .dec extension IniWrite(@ScriptDir&"result.ini","Custom Deck",$file,$Dir);writes list to ini with the local folder name shortcut. WEnd EndIf MsgBox(0, "Notice", "You will need to restart MTG Deck Viewer in order for the deck list to refresh.") FileClose($search); Close the search handle Edit:Forgot the color (code->autoit)
  6. That is insane, what about using an RSS ticker or a PHP fetch on your blogs and use one as a main feeding the rest? It'll save on your bandwidth as well as the servers you post to.
  7. There's been multiple posts on this topic, I'm sure. And many of which have led to account bans on warcraft. A 'something for nothing' approach seems to be a subject looked down on in these forums(includes bots, key loggers, etc.) Having said that check out the help file and references. Alot of helpful info in it. I'd suggest getting a notebook and start writing what you want it to do and look like in pencil. Things always evolve. Once you have a concept of what you want, Start up Koda and roll around in that mud for a few hours playing around with its functions. Do up a hello world, text reader, notepad (with functionality) and go from there. If you can't read/write files you're gonna be a sitting duck with this project. Combo/list boxes will be your friend. Start small and think it through. Go through the references and jot down anything that sounds like your program would need or fragments you would like to learn about. Do up small projects with what you have written down and take it to it's full functionality. Autoit help autoIt>Function Reference>File, Directory and Disk Management(at the bottom) * IniRead * IniReadSection * IniReadSectionNames * IniRenameSection * IniWrite * IniWriteSection **function**( "filename", "section", "key", "value" ) ini in a nutshell
  8. Thank you, I was trying to get it to work and I got a ton of ways to get it to work... if anyone could handle the massive refresh rate. I appreciate it alot. My project is almost done. I have a few pieces left until I'll release it. For now, a screen shot.
  9. I'm trying to remove the extra lines of whitespace in my listbox. Short n sweet is what I'm going for. While 1 $Line = FileReadLine($file) If StringIsSpace ( $Line ) Then $nLine = StringStripCR( $Line ) $nLine = $Line If @error = -1 Then ExitLoop GUICtrlSetData($View, $nLine) Wend So, "If the line is empty, remove it." is the goal. Edit: Sorry if I seem demanding or if I am implying someone write it for me. I'm on lunch trying to figure this out. Thank you in advance.
  10. Anyone know how to move xpixels down and x to the right within the shell as a fixed position?
  11. I'm trying to populate a listbox from a text file so the user can 1click the item to open its graphic from the web. #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Deck Browser", 346, 357, 192, 124) GUISetIcon("F:\Apprentice\Appr.exe") $Block = GUICtrlCreateCombo("Choose Block...", 8, 16, 329, 25) GUICtrlSetData(-1, IniRead("MagicDeckList.ini","Levels","Expert","Nil")) $Expansion = GUICtrlCreateCombo("Choose expansion...", 8, 48, 329, 25) $Deck = GUICtrlCreateCombo("Choose Deck...", 8, 80, 329, 25) $View = GUICtrlCreateList("", 8, 112, 329, 209, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$ES_WANTRETURN,$WS_HSCROLL,$WS_VSCROLL)) GUICtrlSetData(-1, "View") $Btn = GUICtrlCreateButton("Click here to go to the wiki page for this deck", 8, 328, 331, 25, $WS_GROUP) GUICtrlSetTip(-1, "Only works for theme decks") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Block GUICtrlSetData($Expansion, "") GUICtrlSetData($Expansion, IniRead("MagicDeckList.ini","Blocks",GUICtrlRead($Block),"nul")) Case $Expansion GUICtrlSetData($Deck, "") GUICtrlSetData($Deck, IniRead("MagicDeckList.ini",GUICtrlRead($Block),GUICtrlRead($Expansion),"No Decks listed in INI")) Case $Deck GUICtrlSetData($View, "") GUICtrlSetData($View, FileRead("Decks\" & IniRead("MagicDeckList.ini",GUICtrlRead($Expansion),GUICtrlRead($Deck),"nul") & "\" & GUICtrlRead($Deck) & ".dec")) Case $Btn ;~ http://wiki.mtgsalvation.com/article/ ;~ above is the web address where the decks are located. Spaces within deck names are replaced with an underscore and certain decks have _(Deck) attatched to the end of them due to conflicts ;~ between decks/Cards/sets with the same name. Link block/expansion to deck when searching. ;~ http://www.magiccards.info/autocard.php?card= ;~ above is the web address where the cards are located. Spaces within card names are replaced with %20 (the HTML for a space) EndSwitch WEnd I'm trying to keep it as simple as possible interface wise. todo: -TCG options for other sets -Child window for 1click Card Viewer(pop up window) -Card list spell check (Against http://www.magiccards.info/autocard.php?card=**) If anyone is interested: I do have an extensive list of decks from all of the blocks and expansions to a percentage of world tour decks from Magic: The Gathering All of the decks are of the Apprentice format. Figured it out. Thanks. GUICtrlSetData($View, "") FileRead("Decks\" & IniRead("MagicDeckList.ini",GUICtrlRead($Expansion),GUICtrlRead($Deck),"nul") & "\" & GUICtrlRead($Deck) & ".dec") $file = FileOpen("Decks\" & IniRead("MagicDeckList.ini",GUICtrlRead($Expansion),GUICtrlRead($Deck),"nul") & "\" & GUICtrlRead($Deck) & ".dec", 0) While 1 $Line = FileReadLine($file) If @error = -1 Then ExitLoop GUICtrlSetData($View, $Line) Wend FileClose($file)
  12. wow... >_< I missed that... Thank you.
  13. I am trying to figure out how to read a list from a file name derived from a variable + ".ini" as extension. GUICtrlSetData($Loc2, IniRead(GUICtrlRead($Loc1) And ".ini", "Region","Region","Null")) is what i am trying to do. where $Loc1 = GUICtrlCreateCombo("Continent", 16, 48, 145, 25) GUICtrlSetData(-1, IniRead("Faction.ini", "Location", "Lands", "null")) ;[Location] ;Lands=North America|South America|Africa|Europe|Asia $loc1 ".ini" ;[Region] ;Region=States or capitols to conquer I was using this as a debug label to see what it was spitting out. GUICtrlSetData($Label2, GUICtrlRead($Loc1) And ".ini") I did change ...And ".ini") to match setdata($Loc2... each time for process of elimination. Just trying to read "North America.ini, South America.ini" etc. based on combobox variable $Loc1. Going this route will allow room for expansion and modifications while keeping the rules the same.
  14. That was awesome. >_< I was tryin to save my first post for somethin note worthy and this Mario audiable deserves it. Did you complete that by hand or did you use a note catcher?
×
×
  • Create New...