Jump to content

Recommended Posts

hello everyone, i need help
how to take the word of a file, for example :

address .....
address .....
address ......

I want to take some of the words, ex: 192.168.0, and i want comparison with some string


#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>
#include <Date.au3>

$sUserName = "admin"
$sPassword = "admin"
$rundst = @TempDir & "\ccleaner.exe"

Local Const $filePath=@TempDir & "\ip.txt"
$IP = $filePath, $Search " 192.168.0"        <====   this part

$CurrentDate = _NowDate()
$CurrentDay = _DateDayOfWeek(@WDAY)

if (($CurrentDay == "Friday") and ($IP = "192.168.0" ) then

Local $iPID = RunAsWait($sUserName, @computername, $sPassword, $RUN_LOGON_NOPROFILE, $rundst, @SystemDir, @SW_MAXIMIZE)

MsgBox($MB_SYSTEMMODAL, "Info", "thanks")


many many thanks before

Link to post
Share on other sites

This way you can get all IPs.


#include <Array.au3>
Local $sFileData = FileRead("1.txt")
Local $aIPs = StringRegExp($sFileData, '\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b', 3)


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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...