Jump to content

Need help with implementing an algorithm in my code


Guest
 Share

Recommended Posts

I have a serious problem ..

I wrote something big and now I want to put this algorithm:

#include
$Current_site_check = "test.txt"
; Read the file into an array
Global $aLines2
_FileReadToArray($Current_site_check, $aLines2)
$Search_List_lines = $aLines2[0]
$sFile_Text = FileRead($Current_site_check)
$sFile_Text = StringRegExpReplace($sFile_Text, "[rn]", "")
ConsoleWrite($sFile_Text & @CRLF)
$C_INI_Search = "test1"

$iLocation = StringInStr($sFile_Text, $C_INI_Search)
; If it is found then work out the line
If $iLocation Then
$iCharCount = 0
For $a = 1 To $Search_List_lines
$iCharCount += StringLen($Current_site_check)
If $iCharCount > $iLocation Then
$val2 = $a-1
EndIf
Next
MsgBox(4096, "Search Algorithm 2","(Search Algorithm 2 - only in the line-breaks) - " & "Found: """ & $C_INI_Search & """ " & $val2 & " times")
EndIf

In this code I wrote:

https://www.dropbox.com/s/97pghkz8zq18psd/help.rar

You need to download it. I have to bring it that way because it comes with another files.)

Between a lines 37 - 44

According to my understanding, it should use the same loops and use the same variables.

But I can not able to use the loops already done.

Is this possible?

I have this algorithm will work ln lines 37 - 44 inside the

If $C_INI_Search <> "NotFound" Then

this is the Plan.. this shuld use the Variables that were created

please halp me

Edited by Guest
Link to comment
Share on other sites

  • Moderators

gil900, your first link is to the post that Melba locked, as it was against forum rules. Why would you then open another thread, asking for continued assistance based on the locked thread?! I suggest you read the rules carefully.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Oh god, he's creating an "algorithm" to seek out teen pornography, what is wrong with you man? Don't you have any morals? Oh, wait, we're on the internet.

Anyway, that doesn't sound like it breaks the rules, it sounds like it breaks a few real world laws.

Edited by CaptainClucks
Link to comment
Share on other sites

It was just coincidence ..

They were just words I chose them like an idiot for the example .. I have no goal to do a search with such words.

This is a mistake .. :oops:

Edited by Guest
Link to comment
Share on other sites

  • Moderators

gil900,

This is a mistake

Correct. And in that thread I told you not to repost the same question - and yet you have seen fit to ignore that advice. Have a few days holiday to think about the Forum Rules and how you will follow them in future. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...