SphereCommunity
How do I script the closealldialogs function? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: How do I script the closealldialogs function? (/Thread-How-do-I-script-the-closealldialogs-function)



How do I script the closealldialogs function? - kduzera - 09-21-2018 11:56 AM

How i do that?

I've seen many threats containing this function "closealldialogs".


That would be very, very helpfull. Sorry :/ NB here.


RE: How do I script the closealldialogs function? - svf - 09-22-2018 12:34 AM

(09-21-2018 11:56 AM)kduzera Wrote:  How i do that?

I've seen many threats containing this function "closealldialogs".


That would be very, very helpfull. Sorry :/ NB here.

Code:
[function closealldialogs]
if (<memoryfindtype.memory_gumprecord>)
forcharmemorytype memory_gumprecord
trysrc <cont> src.dialogclose <tag0.dialog_name> <argn2>
endfor
endif



RE: How do I script the closealldialogs function? - kduzera - 09-28-2018 09:55 PM

THANNNKKK UU BRO!!


RE: How do I script the closealldialogs function? - golfin - 09-29-2018 05:14 PM

The latest sphere shows:
PHP Code:
09:06:ERROR:(function.scp,55)Undefined symbol 'memory_gumprecord' ['memory_gumprecord'

And why actually have this feature? It is built into the original client. Just type the command from Options on the key.


RE: How do I script the closealldialogs function? - Coruja - 10-01-2018 02:43 PM

'memory_gumprecord' memory item was removed in 2007 (yes, 11 years ago), it got replaced by DIALOGLIST function

so instead check for <MEMORYFINDTYPE.memory_gumprecord> you must use <DIALOGLIST.x>

Code:
[FUNCTION CloseAllDialogs]
IF (<DIALOGLIST.COUNT>)
   FOR <eval <DIALOGLIST.COUNT> - 1> 0
      DIALOGCLOSE <DIALOGLIST.<LOCAL._FOR>.ID>
   ENDFOR
ENDIF