Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Counting characters in an editfield
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Counting characters in an editfield (Read 418 times)
0 Members and 1 Guest are viewing this topic.
Blanco
Former Staff
Counting characters in an editfield
«
on:
03 Sep 2004, 17:28:35 »
This question is related to my codepad script...
http://www.ofpec.com/yabbse/index.php?board=27;action=display;threadid=19435
Is it possible to count the characters you've typed in an editfield of a dialog?
Right now, I'm doing it with updating an variable each time you press one of the buttons. That works perfect, but right now you must use the dialog buttons!
You can type the code with your numeric keypad on your keyboard but the script won't react then.
Any workarounds?
«
Last Edit: 03 Sep 2004, 18:07:31 by Blanco
»
Logged
Search
or
search
or
search
before you ask.
LCD
Former Staff
Re:Counting characters in an editfield
«
Reply #1 on:
03 Sep 2004, 17:55:56 »
umm... is there a way 2 check the size of a string ? thats wat u really need right ? ill check that ;D
LCD OUT
Logged
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing -
O-Team Beta
MachoMan
Honoured
Former Staff
KISS, Keep it Simple Stupid
Re:Counting characters in an editfield
«
Reply #2 on:
04 Sep 2004, 16:52:25 »
in most programming languages a String is an Array of Chars, so you could try :
Code:
[Select]
count x
where x = your String.
I'm not sure ofp handels String this way though, but u can at least try it.
«
Last Edit: 04 Sep 2004, 16:52:46 by MachoMan
»
Logged
Get those missions out there you morons!
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Counting characters in an editfield
Top of page