logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Fabianogc  
#1 Posted : Wednesday, September 28, 2022 6:46:43 AM(UTC)
Fabianogc

Rank: Newbie

Groups: Registered
Joined: 11/18/2021(UTC)
Posts: 8
Brazil
Location: São Paulo

Thanks: 2 times
Dim Index as integer
Dim x As Integer
Do while Index = 0
'for x = 1 to 7

'transform to random search ????????
For i As Integer = 1 To 100000



Dim rnd As New Random
x = rnd.Next
api.Function("DataSourceSelectRow",Value:="GC,VIVENSIS," & i)
sleep(100)
next
index = 0
loop
doggy  
#2 Posted : Wednesday, September 28, 2022 7:14:47 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,095
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 922 time(s) in 761 post(s)
Why post this again (yesterday) ?

If posting code pls use proper syntax highlighting for clarity

doing a sequential datasourceselectrow is not random selection, might aswel just do a autonext in the datasource manager ;-) !
Fabianogc  
#3 Posted : Thursday, September 29, 2022 1:16:13 AM(UTC)
Fabianogc

Rank: Newbie

Groups: Registered
Joined: 11/18/2021(UTC)
Posts: 8
Brazil
Location: São Paulo

Thanks: 2 times
Sorry, I thought I posted in the wrong place so I deleted and reposted.

I'm not a programmer, I'm curious and I do some programming for my use in vMIX for personal use.

This code would help me to do a giveaway, but I'm having trouble making the name selection to be random
doggy  
#4 Posted : Thursday, September 29, 2022 2:04:10 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,095
Belgium
Location: Belgium

Thanks: 284 times
Was thanked: 922 time(s) in 761 post(s)
Originally Posted by: Fabianogc Go to Quoted Post
Sorry, I thought I posted in the wrong place so I deleted and reposted.

I'm not a programmer, I'm curious and I do some programming for my use in vMIX for personal use.

This code would help me to do a giveaway, but I'm having trouble making the name selection to be random


The code you wrote will not do that.
Do some google search on using random with "vb.net random". One will receive lots of explenations and examples
Fabianogc  
#5 Posted : Tuesday, November 1, 2022 1:02:40 AM(UTC)
Fabianogc

Rank: Newbie

Groups: Registered
Joined: 11/18/2021(UTC)
Posts: 8
Brazil
Location: São Paulo

Thanks: 2 times

I managed to find a solution to my issue. This settled for the moment.


Static Generator As System.Random = New System.Random()
dim i as integer
dim fieldname as string = "Message.Text"
dim zahlrnd as integer

for i = 1 to 101
ROMDOM= Generator.Next(1, 101)
API.Function("SetText",Input:="ROMDOM.gtzip",SelectedName:= "Message.Text",Value:=ROMDOM)

sleep(100)
next
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.