I'd like to replace 'COMMA' with ',' for example:
$myString = "COMMA" StringRegExpReplace($myString, 'COMMA', ',') Now I've tried escaping the ',' in various ways unsuccessfully, such as:
[,] seems to work in the pattern, I just can't figure out how to use it in the replace, and it seems everyone online is only interested in removing/replacing commas lol.
I also tried creating and using a variable as the replacement but also didn't work:
$myComma = "," $myString = "COMMA" StringRegExpReplace($myString, 'COMMA', $myComma) I'm sure it's super simple if someone could point me in the right direction - thanks.
i need a script that can replace words in text with other words from a words list
it has to have 2 edit boxes input/output and a button "run"
from word_list.txt it choses which word to replace with. words are separated with commas for multiple choice
; AutoIt GUI Example ; Created: 17/01/2005 - CyberSlug ; Modifed: 05/12/2011 - guinness ; Modifed: 09/06/2014 - mLipok #Region INCLUDE #include <AVIConstants.au3> #include <GuiConstantsEx.au3> #include <TreeViewConstants.au3> #EndRegion INCLUDE #Region GUI GUICreate("Sample GUI", 400, 420) GUISetIcon(@SystemDir & "\mspaint.exe", 0) #EndRegion GUI #Region EDIT GUICtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 10, 380, 175) GUICtrlSetTip(-1, '#Region EDIT') #EndRegion EDIT #Region EDIT2 GUICtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 185, 380, 175) GUICtrlSetTip(-1, '#Region EDIT') #EndRegion EDIT2 #Region BUTTON GUICtrlCreateButton("Sample Button", 10, 360, 100, 30) GUICtrlSetTip(-1, '#Region BUTTON') #EndRegion BUTTON #Region GUI MESSAGE LOOP GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() #EndRegion GUI MESSAGE LOOP
i'm trying to create a program that let's the user type a word in an input field (gui) and when a button is pressed the letters of the word are replaced by 1 word each from a list of words in a text file
i created the gui for it but i need help to add some more code to make it work like intented
each letter of a word should be replaced by a word from a text file
the text file is a source for replacing letters is a file with 2 columns separated by tab that contains the entire alphabet (26 rows)
please help if possible
i posted an example gui screenshot
If we give the below line in our script, we can expand the variables in double quotes to its values.
AutoItSetOption ("ExpandVarStrings", 1) Like,
Local $b=4 MsgBox(0,"$b$","See subject") But coming to variables, they are not getting expanded.
Local $a=[1,2,3] Local $b=4 _ArrayDisplay($a) MsgBox(0,"$a$$b$","See subject") Could anyone please help me on this.
I am currently doing a project involving keeping some parameters in an internal 2d array. I am reading part of that to and from an ini file.
As part of the reading I need to put the variables from the ini file into the 2D array. I have found _arrayinsert(), but that creates additional lines.
Bascially I would like something as this:
 a1 a2 a3 a4  b1 b2 b3 b4  c1 c2 c3 c4 And reading setting for "2" being d1 d2 d3 d4 I should now have
 a1 a2 a3 a4  d1 d2 d3 d4  c1 c2 c3 c4 Is there a built-in UDF or similar to do something like that already ? Or did I missing something real obvious ?
I have rolled my own code, which works. But of course it could be improved.
Thanks for all comments, happy to learn from you all !