Search found 462 matches

by WalkerOfTheDay
22 Aug 2019, 04:36
Forum: Ask For Help
Topic: Why does is condition always true ?? Code always executes Topic is solved
Replies: 6
Views: 343

Re: Why does is condition always true ?? Code always executes Topic is solved

Still interested to learn why in my faulty code below would always execute though.

Code: Select all

if temp := "Huisman"
{
	MsgBox, % temp
	Regel := SubStr(A_GuiControl, 13)
	GuiControl,, Eenheid%Regel%, Pallet
}
by WalkerOfTheDay
22 Aug 2019, 04:06
Forum: Ask For Help
Topic: Why does is condition always true ?? Code always executes Topic is solved
Replies: 6
Views: 343

Re: Why does is condition always true ?? Code always executes Topic is solved

swagfag wrote:
22 Aug 2019, 03:59
then it is false always. confirm it by stepping through with a debugger
WalkerOfTheDay wrote:
22 Aug 2019, 03:30
edit
Think I found the issue :D

if(temp = "Huisman") seems to work.
that certainly wasnt the issue. whitespace matters in this case not
Indeed I forgot to add the ( )
by WalkerOfTheDay
22 Aug 2019, 02:57
Forum: Ask For Help
Topic: Why does is condition always true ?? Code always executes Topic is solved
Replies: 6
Views: 343

Why does is condition always true ?? Code always executes Topic is solved

Hi could someone review below code ? In snippet 2, how can ik be that whatever value is in if temp := "whatever text " is always true ?? The code under snippet 2 always executes Snippet 1: Counter := 0 No := 30 LeftPos := 33 ;links TopPos := 93 ;boven ButtonTopPos := 92 Gui, +AlwaysOnTop Gui, Font, ...
by WalkerOfTheDay
08 Jul 2019, 07:00
Forum: Ask For Help
Topic: Function is returning wrong value ??
Replies: 7
Views: 408

Re: Function is returning wrong value ??

What if StrLen() is exactly 40 or 50? Still working on the code this was just an example. #NoEnv Description := ["This is a rather short description!"] Tabs := HowManyTabs(Description[1]) MsgBox, %Tabs% ExitApp HowManyTabs(Str) { Len := StrLen(Str) If (Len > 50) Return "`t" . "1 " . Len Else If (Le...
by WalkerOfTheDay
08 Jul 2019, 06:17
Forum: Ask For Help
Topic: Function is returning wrong value ??
Replies: 7
Views: 408

Re: Function is returning wrong value ??

there are still errors in this script..... the same kind of errors Okay... there are still errors in this script..... the same kind of errors Oh yeah, you mean the between part right ? Forgot to change that too. This seems to work: howmanytabs() { global Length := StrLen(Description[A_Index]) if(Le...
by WalkerOfTheDay
08 Jul 2019, 05:28
Forum: Ask For Help
Topic: Function is returning wrong value ??
Replies: 7
Views: 408

Re: Function is returning wrong value ??

Thanks guys. And what do I do to fix this ? tried this, but that also isn't helping: howmanytabs() { global Length := StrLen(Description[A_Index]) if(Length > 1 and Length < 40) { tabs := "`t`t" . " 2 " . Length } if(Length between 41 and 50) { tabs := "`t`t`t" . " 3 " . Length } if(Length > 51) { t...
by WalkerOfTheDay
08 Jul 2019, 05:02
Forum: Ask For Help
Topic: Function is returning wrong value ??
Replies: 7
Views: 408

Function is returning wrong value ??

When I run below function on a 34 character variable, why is the value of tabs "`t`t`t" . " 3 " One would think it should be tabs := "`t`t" . " 2 " , right ? Because the value is between 1 and 40... howmanytabs() { global if(StrLen(Description[A_Index]) between 1 and 40) { tabs := "`t`t" . " 2 " } i...
by WalkerOfTheDay
05 Jul 2019, 09:20
Forum: Ask For Help
Topic: Run again and again a hotkey with primary key down
Replies: 2
Views: 238

Re: Run again and again a hotkey with primary key down

Something like this ? This will hold the ctrl key when you press it once. After pressing it again it will release it. #NoEnv ; for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scr...
by WalkerOfTheDay
05 Jul 2019, 09:00
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

just me wrote:
05 Jul 2019, 08:08
You must explicitely declare Description as an array/object:

Code: Select all

Description := []
...
		Description[No] := LineArray[18]
		...
God.. I've been staring at my code the entire day and would have never figured it out.

Thanks again !
by WalkerOfTheDay
05 Jul 2019, 08:01
Forum: Ask For Help
Topic: How to convert text to F5 funcion (barcode usage) Topic is solved
Replies: 4
Views: 300

Re: How to convert text to F5 funcion (barcode usage) Topic is solved

So if I understand correctly, when you press the F5 key, you want to send 1q3z in a barcode software ? #IfWinActive, BarCode Software 1.0 <------------------ Change this to the title of the software that you are using F5::Send, 1q3z Or perhaps I understood you wrong, you could also try a hotstring: ...
by WalkerOfTheDay
05 Jul 2019, 01:31
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

Okay just shoot me. Why does this not work ?? Why does it work for Article[No] but not for Description[No] ?? I don't see any difference in the code. Edit Could it have something to do with the fact that the articlenumbers are numeric ? Because this seems to work: Description%No% := LineArray[18] Ms...
by WalkerOfTheDay
04 Jul 2019, 08:36
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

Then once you found an order number you can break the file-reading loop as soon as the order number does not match any more. Good suggestion, I tried but cannot get it working. At what point should I use Break ? Because the ordernumber is not always found immediatly, wouldn't it break at the wrong ...
by WalkerOfTheDay
04 Jul 2019, 04:39
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

just me wrote:
04 Jul 2019, 04:04
OK, I understand. Does it mean that all lines containing the same order number occur as one block in the file?
Yes indeed.
by WalkerOfTheDay
04 Jul 2019, 03:45
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

Thanks again, it works ! The reason I'm doing single variables is this: For instance if you look at 'Financial Status' , only the first lines show it as paid , but all lines below are also paid but it isn't showing in the csv file so the variable would get overwritten into a blank variable. I need t...
by WalkerOfTheDay
04 Jul 2019, 01:27
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

Article%No% := LineArray[21] creates one 'element' of a 'pseudo'-array. A pseudo-array cannot be accessed using the array syntax MsgBox, 4096, , % Article[A_Index] ; shows nothing, why doesn't this show the article1, 2, 3 and 4 info ????? To create a 'real' array Declare an ampty array before you s...
by WalkerOfTheDay
03 Jul 2019, 07:45
Forum: Ask For Help
Topic: (Always) struggling with Arrays
Replies: 13
Views: 915

Re: (Always) struggling with Arrays

Sigh :crazy: :crazy: Back at it again, but still having trouble grasping it. No := 0 InputBox, Orderno, Ordernumber, Ordernumber to find #: Orderno := "#" . Orderno LineArray := [] ; start with an empty Array Loop, read, orders_export.csv { LineNumber = %A_Index% Loop, parse, A_LoopReadLine, CSV Lin...
by WalkerOfTheDay
03 Jul 2019, 03:03
Forum: Ask For Help
Topic: How to deal with csv comma delimiters that also have comma's inside ?
Replies: 6
Views: 603

Re: How to deal with csv comma delimiters that also have comma's inside ?

just me wrote:
03 Jul 2019, 02:25
Which field of your sample file holds the order number and what term do you search for?
Hi just me,

The very first one, 'Name' contains the ordernumbers.

edit
I just realized I'm an idiot :thumbdown: I never included the #-sign when seaching :crazy: :crazy: :crazy:
by WalkerOfTheDay
03 Jul 2019, 01:10
Forum: Ask For Help
Topic: How to deal with csv comma delimiters that also have comma's inside ?
Replies: 6
Views: 603

Re: How to deal with csv comma delimiters that also have comma's inside ?

JoeWinograd wrote:
02 Jul 2019, 10:24
You want this:

if (Value = Orderno)

Not this:

if (Value := Orderno)

Regards, Joe
Yes, that's what I thought too, but when I do that the MsgBoxes are ignored completely.
by WalkerOfTheDay
02 Jul 2019, 08:40
Forum: Ask For Help
Topic: How to deal with csv comma delimiters that also have comma's inside ?
Replies: 6
Views: 603

Re: How to deal with csv comma delimiters that also have comma's inside ?

Hi I've been playing around with this and I'm noticing something strange (at least to me). Please find my (working) code below. The issue I'm having is, when I replace If Instr(Value, Orderno) with if (Value := Orderno) It only gives the value of the top row of the file with if instr() included it s...

Go to advanced search