|
|
#1 |
|
Junior Member
Join Date: May 2005
Posts: 8
|
Assign an Integer Value to a Variable
Hello,
This is gonna seem like a really stupid question but here goes. I have a variable I have defined say var MY_COUNTER. I have worked out how to add 1 to it by using IntOp. However what I cannot work out how to do is to set it to a particular number, say 5685 or 6457, etc. Err, this is gonna sound stupid but how to I do that? Sorry to ask such a basic question but I cannot find an answer in the docs, web search or anything!! Thanks in advance. Cheers, Neil |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Either you mean StrCpy $MY_COUNTER 6457 or I'm completely confused.
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
|
In nsis, all variables and registers (and the stack) are strings internally, so when you use IntOp the string is converted to a number and back
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: May 2005
Posts: 8
|
Hello,
That's it understand now - thanks. I was not using strcpy because I wanted to assign an int - not a string. However if everything is a string inside and strcpy works then I understand. Thanks fro your help. Cheers, Neil |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|