Jump to content

TheDcoder

Active Members
  • Posts

    7,103
  • Joined

  • Days Won

    88

Everything posted by TheDcoder

  1. @guinness Thanks, but I used them already, Now I use regex because its more efficient (and simple) TD
  2. I think the video is somewhat incorrect (mis-leading?)... IMHO though Except the video, Its pure gold, TD
  3. @boththose That is one messed up code, here is my version: $sFile = "C:\Program Files (x86)\AutoIt3\AutoIt.chm" MsgBox(0, "RegEx is awesome", StringRegExpReplace($sFile, "^.*\\|\..*$", ""))TD P.S That RegEx is from my RegEx library
  4. Hello $sFile = "AutoIt.chm" $sFile = StringRegExpReplace($sFile, "<Regex Here>", "<Regex Here>") ; I need "AutoIt" as outputI suck at RegEx Thanks in Advance
  5. @wakillon You will find your answer here
  6. Hello, I found the Ideal way (IMHO) to make your (existing) GUI Drag & Drop friendly... All you need is: Case $GUI_EVENT_DROPPED ; This will go in your GUI loop Drag_N_DropManager(@GUI_DropId, @GUI_DragFile) Func Drag_N_DropManager($hDropID, $sDropFile) ; Your D&D Manager ; Modify as required EndFuncSo implementing this method in my GUI would result in: #include-once ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> #include <GuiListView.au3> Local $hGUI = GUICreate("GUI", 350, 215, -1, -1, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0xFFFFFF,$hGUI) Local $hListView = GUICtrlCreatelistview("Column 1|Column 2",5,7,339,169,4,544) GUICtrlSetState(-1, $GUI_DROPACCEPTED) Local $hButtonCopy2 = GUICtrlCreateButton("Copy Column 2",245,180,100,30,-1,-1) Local $hButtonAdd = GUICtrlCreateButton("Add ListViewItem",110,180,128,30,-1,-1) Local $hButtonCopy1 = GUICtrlCreateButton("Copy Column 1",4,180,100,30,-1,-1) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hButtonAdd GUICtrlCreateListViewItem(InputBox("Enter", "Enter text for column 1") & '|' & InputBox("Enter", "Enter text for column 2"), $hListView) Case $hButtonCopy1 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[1]) ; Avoid error Case $hButtonCopy2 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[2]) ; Avoid error Case $GUI_EVENT_DROPPED Drag_N_DropManager(@GUI_DropId, @GUI_DragFile) EndSwitch WEnd Func Drag_N_DropManager($hDropID, $sDropFile) GUICtrlCreateListViewItem(FileRead(FileOpen($sDropFile)), $hListView) EndFunc Thanks @ahmet for the Idea . Hope it may help you, TD
  7. ZaursBot? Looks suspicious to me... What is it? Please read the forum rules correctly before posting about game bots
  8. @ahmet I think you have misunderstood, The code is just a decoy. I wanted to know the ideal way of implementation of D&D in a already complete script
  9. @ahmet Thanks for the nice example but, ​Ok ?
  10. No support for .minigsf files?
  11. Sure
  12. Thanks @wakillon
  13. @wakillon Anything other than keygen music?
  14. Where can I find some good ol' chiptunes?
  15. ​Erm..... Thanks?
  16. ​I know but I am busy. Will work on a simple GUI
  17. Hello, I am confused about using these 2 macros I already have a program with some ListView controls in it... I am thinking about adding drag & drop functionality to them.. but... I can't explain... Here is my GUI: #include-once ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> #include <GuiListView.au3> Local $hGUI = GUICreate("GUI",350,215,-1,-1,-1,-1) GUISetBkColor(0xFFFFFF,$hGUI) Local $hListView = GUICtrlCreatelistview("Column 1|Column 2",5,7,339,169,4,544) Local $hButtonCopy2 = GUICtrlCreateButton("Copy Column 2",245,180,100,30,-1,-1) Local $hButtonAdd = GUICtrlCreateButton("Add ListViewItem",110,180,128,30,-1,-1) Local $hButtonCopy1 = GUICtrlCreateButton("Copy Column 1",4,180,100,30,-1,-1) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $hButtonAdd GUICtrlCreateListViewItem(InputBox("Enter", "Enter text for column 1") & '|' & InputBox("Enter", "Enter text for column 2"), $hListView) Case $hButtonCopy1 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[1]) ; Avoid error Case $hButtonCopy2 $aData = StringSplit(GUICtrlRead(GUICtrlRead($hListView)), '|') If IsArray($aData) = 1 Then ClipPut($aData[2]) ; Avoid error EndSwitch WEnd So, what I need is a good example of using them in a normal my GUI with a ListView control. Thanks in Advance, TD P.S Don't blame for using magic numbers, my GUI designer did it.
  18. Thanks for the very quick lesson @Melba23
  19. AutoIt is made in C++ Coding in C++ = Problems with maths
  20. @guinness I like it, The default SciTE color scheme is pretty dull
×
×
  • Create New...