Sign in to follow this  
Followers 0
Misha

Getting more then one match without using _StringBetween

6 posts in this topic

Erm well I am trying to replace all variables in a file with numbers and so far I got this code:

#include <File.au3>
#include <String.au3>
$File = FileOpeX[ÙÊ   ][ÝÓÜ[[K][ÝËÚ[ÝÜÑ  ][ÝÐ[

I][ÝÊBÌÍÑ[S"ÒfÆT÷VäFÆörgV÷C´÷VâfÆRvFf'2ââgV÷C²ÄvæF÷w6F"ÂgV÷C´Æ ¨¸¨¤ÅÕ½Ðì¤)½ÈÀÌØí¤ôÄѼ}¥±
½Õ¹Ñ1¥¹Ì ÀÌØí¥±¤($ÀÌØí¬õMÑÉ¥¹id(FileReadLine($File,$i),StringInStr(FileReadLine($File,&#0ÍÚJK ][ÝÉÌÍÉ][ÝÊKLBBZYÝ  ÌÍÚÈH   ][ÝÉ][ÝÈ[B[ÙØÞÂgV÷C²gV÷C²Âb33c¶² G&Fb33c´fÆRÂb33c¶Ã#¦f÷"b33c¶¢ÒF}¥±
½Õ¹Ñ1¥¹Ì ÀÌØí¥±È¤(%¥MÑÉ¥¹1С¥±I1¥¹ ÀÌØí¥±È°ÀÌØj),12) Then 
    $Shorten=StringTrimLeft(FileReadLine($File2,$jKM
BBWÔXÙTÝ[Ò[[J   ÌÍÑ[K    ÌÍÚË    ÌÍÔÚÜ[BQ[YS^VæD` æW@

well it edits and stuff but only for 1 per line..what if there are 2 variables on the same line..also it just does one line and then gets stuck, assist.

Thank you;

Share this post


Link to post
Share on other sites



Erm well I am trying to replace all variables in a file with numbers and so far I got this code:

#include <File.au3>
#include <String.au3>
$File = FileOpenX[ÙÊ  ][ÝÓÜ[[K][ÝËÚ[ÝÜÑ  ][ÝÐ[

I][ÝÊBÌÍÑ["ÒfÆT÷VäFÆörgV÷C´÷VâfÆRvFf'2ââgV÷C²ÄvæF÷w6F"ÂgV÷C´Æ¨¸¨¤ÅÕ½Ðì¤)½ÈÀÌØí¤ôÄѼ}¥±
½Õ¹Ñ1¥¹Ì ÀÌØí¥±¤(ÀÌØí¬õMÑÉ¥gMid(FileReadLine($File,$i),StringInStr(FileReadLine($File,&ÌÍÚJK  ][ÝÉÌÍÉ][ÝÊKLBYÝ    ÌÍÚÈH   ][ÝÉ][ÝÈ[×6v&÷ÂgV÷C²gV÷C²Âb33c¶²¢G&Fb33c´fÆRÂb33c¶Ã#)½ÈÀÌØí¨ôÄѼ}¥±
½Õ¹Ñ1¥¹Ì ÀÌØí¥±È¤(¥MÑÉ¥¹1С¥±Iine($File2,$j),12) Then
    $Shorten=StringTrimLeft(FileRead[J  ÌÍÑ[L    ÌÍÚKM
BÔXÙTÝ[Ò[[J ÌÍÑ[K    ÌͲÂb33cµ6÷'FVâ¢VæD`¢æW@¤VæD`¢æW@

well it edits and stuff but only for 1 per line..what if there are 2 variables on the same line..also it just does one line and then gets stuck, assist.

Thank you;

Can you post a sample of the type of file you are file trying to change? That is the file with the variables you are trying to replace. It will help a lot in trying to determine where your code is failing...

Share this post


Link to post
Share on other sites

oh wow I forgot about this code..sorry

the code is like this:

$A231233A2445="X"
$A231233A2446="Y"

etc.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

oh wow I forgot about this code..sorry

the code is like this:

$A231233A2445="X"
$A231233A2446="Y"

etc.

So, from looking at your code so far, it looks like the lines "$A231233A2445 = "X", etc are in the file "$File" and you have another file, $File2, that has the same variables, but without the "$" ? Is that correct?

Edit: Please post a sample of what you want the file to look like when it's changed, that way, we'll know what you've got and what you want and it will be easier to get there!

Edited by ResNullius

Share this post


Link to post
Share on other sites

He's trying to break obfuscation :rolleyes: ...


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

He's trying to break obfuscation :lmao: ...

D'uoh...
If $PostedQuestion = "WasteOfSpace" then
  If $I_can_see_that = TRUE then
      Exit
  Else
      Do 
         Sleep(100)
      Until $SmOke_N_opinion_offered = True
      Exit
  EndIf
EndIf

See, I'm learning too... :whistle:

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