[Home] [Search] [Inbox] [Write PM] [Admin]
[Return]

Posting mode: Reply

(for deletion)
  • Allowed file types are: swf
  • Maximum file size allowed is 50000 KB.
  • Images greater than 200 * 200 pixels will be thumbnailed.





File: respite.swf
(5.73 MB, 500x281)[swfchan]
SWF Embed
Someone should make a software that shuffles through flashes as if they were mp3 files for weird people who exclusively listens to flash loops, like me. (´¬`)
>>
I gotchu covered anon! ヽ(´∇`)ノ
I had an Ai code up a bash script for Windows that gathers every sfw in an array in random order. And plays them for 25 seconds before moving onto the next flash. It uses ruffle unfortunately as it didn't work flash player 32. I'm on Linux now so this code is useless to me.
Grab this txt file, set it to your desired sfw folder. Then use PS2EXE to turn it into an executable. Unfortunately I don't think I can send txt through the flash category so here it is in plain text.
You can tell its ai because it puts in so many gosh darn comments.

# Path to the folder containing .swf files
$folderPath = "D:\FlashSWF\Simple_loops_and_scenery"

# Path to the flash player executable (e.g., Ruffle, Flash Player Projector)
# Ensure this path is correct and the executable can be run.
$playerPath = "D:\FlashSWF\ruffle.exe"

# --- Script Start ---

Write-Host "Searching for .swf files in: '$folderPath'"

# Get all .swf files in the specified folder
# Get-ChildItem returns FileInfo objects, which contain FullName, Name, etc.
$swfFiles = Get-ChildItem -Path $folderPath -Filter "*.swf" -ErrorAction SilentlyContinue

# Check if any .swf files were found
if ($swfFiles.Count -eq 0) {
    Write-Host "Error: No .swf files found in the folder '$folderPath'."
    Write-Host "Please ensure the folder path is correct and contains .swf files."
    exit
}

Write-Host "Found $($swfFiles.Count) .swf files."
Write-Host "Starting continuous playback in randomized order. Press Ctrl+C to stop."

# Infinite loop to continuously play randomized playlists
while ($true) {
    Write-Host "`n--- Shuffling playlist for a new cycle ---"

    # Randomize the order of the SWF files
    # Get-Random with -Count $swfFiles.Count ensures all files are returned in a random order
    $randomizedPlaylist = $swfFiles | Get-Random -Count $swfFiles.Count

    # Loop through each file in the newly randomized playlist
    foreach ($file in $randomizedPlaylist) {
        Write-Host "Playing: $($file.Name) (Path: $($file.FullName))"

        # Start the flash player process
        # -PassThru captures the process object, allowing us to manage it specifically
        # The argument list needs the full path enclosed in double quotes in case of spaces
        try {
            $process = Start-Process -FilePath $playerPath -ArgumentList "`"$($file.FullName)`"" -PassThru -ErrorAction Stop
        }
        catch {
            Write-Host "Error starting player for $($file.Name): $($_.Exception.Message)"
            Write-Host "Please ensure '$playerPath' is a valid executable."
            # Attempt to continue with the next file if player fails to start
            continue
        }

        # Wait for 10 seconds before closing the current player
        Start-Sleep -Seconds 25

        # Attempt to close the specific flash player process that was just opened
        if ($process -and -not $process.HasExited) {
            Write-Host "Stopping process (ID: $($process.Id)) for $($file.Name)..."
            try {
                Stop-Process -Id $process.Id -Force -ErrorAction Stop
            }
            catch {
                Write-Host "Warning: Could not stop process (ID: $($process.Id)). It might have already closed or access was denied."
            }
        } else {
            Write-Host "Process for $($file.Name) already exited or was not found running."
        }

        # Optional: Add a small delay between files if desired
        # Start-Sleep -Seconds 1
    }

    Write-Host "`n--- Finished playing all files in this cycle. Preparing for next cycle. ---"
    # Optional: Add a short pause before starting the next full cycle of randomized files
    Start-Sleep -Seconds 5
}

# To convert this script to an executable (.exe), you can use PS2EXE:
# Invoke-PS2EXE -InputFile "your_script_name.ps1" -OutputFile "your_script_name.exe"
#  Invoke-PS2EXE -InputFile "C:\Users\User\Desktop\Flashes_array.txt" -Outputfile "C:\Users\User\Desktop\Flashes_array.exe"
# To stop the script while it's running in PowerShell, press Ctrl + C.


I


Delete post: []