ScriptSpot

Forum topic · General Scripting

For i in $ select more problem

By Mrjacks2o · 2017-03-14

Description

Hi i was wondering how i can Change $*RG145* to anything i input in SMI Edittext
so it searches for what i input instead of RG145
this is my code...
thanks

button check " Find " enabled:true pos:[165,20]
edittext SMI "Search" pos:[20,20] visible:true width:125 height:20
---------------------------------------------------------------
on check pressed do
(

-----------------------------------RG1------------------------------
for i in $*RG145* do selectmore i
---------------------------------------------------------------------
)
)

Comments (2)

.

miauu · 2017-03-14


(
	global rol_
	try(destroyDialog rol_)catch()
	rollout rol_ ""
	(
		button check " Find " enabled:true 
		edittext SMI "Search" width:125 height:20
	---------------------------------------------------------------
		on check pressed do
		(
			objsToSellArr = for i in objects where (matchPattern i.name pattern:("*"+SMI.text+"*")) collect i
			selectMore objsToSellArr
		)
		
	)
	createdialog rol_ 		
)

Mrjacks2o · 2017-03-15

Thanks Miauu helped me allot!!!!